Documentation

Sensor Agnostic Module for ICP Signal Conditioner

roto_icpsc.framework for iOS®/iPadOS®


  • Created: 15 Feb, 2021
  • Update: 11 Oct, 2021

If you have any questions that are beyond the scope of this document, Please feel free to email via info@rotovibes.com


Description

roto_icpsc.framework is an iOS®/iPadOS® library that allows communication with the ICP Signal Conditioner USB Digital 2-channel device. The framework provides simple commands to connect, calibrate, collect and post-process the vibration data.


Installation

Follow the steps below to install the roto-icpsc framework

  1. Drag and drop the roto_icpsc.framework file into your Xcode project
  2. Select the "Embed & Sign" option in the Framworks, Libraries and Embedded Content menu

Configuring your project

  1. Import the roto_icpsc.framework to your project class
  2. 
    #import "ViewController.h"
    #import "roto_icpsc/icpsc_collect.h"
    
    @interface ViewController ()
    @end
    
    @implementation ViewController
    
    - (void)viewDidLoad {
       [super viewDidLoad];
    }
    

Connecting to the Sensor

  1. Create an action to start reading the sensor's data using the startSensorInput method.
  2. 
    ...
    #import "roto_icpsc/icpsc_collect.h"
    
    ...
    - (IBAction) startSensor {
        [icpsc_collect startSensorInput];
    }
    ...
     
  3. Check the sensor's ID by using the command: getDeviceId
  4. 
    ...
    - (void) deviceId {
        NSLog(@"deviceID: %@", [icpsc_collect getDeviceId]);
    }
    ...
        

Collecting Data

  1. Request the data collection with the number of samples and sampling rate using the collectDataWithSamplingRate:(int) withNumberOfSamples:(int) method.
  2. 
    ...
    //Sampling Rate Selection:
    //
    //for 48kHz audio devices:
    //samplingRateCode:0 -> SamplingRate = 48000
    //samplingRateCode:1 -> SamplingRate = 24000
    //samplingRateCode:2 -> SamplingRate = 12000
    //samplingRateCode:3 -> SamplingRate = 6000
    //
    //for 44.1kHz audio devices:
    //samplingRateCode:0 -> SamplingRate = 44100
    //samplingRateCode:1 -> SamplingRate = 22050
    //samplingRateCode:2 -> SamplingRate = 11025
    //samplingRateCode:3 -> SamplingRate = 5512.5
    //
    //Number of Samples Selection
    //numberSamplesCode:0 -> NumberOfSamples = 4096
    //numberSamplesCode:1 -> NumberOfSamples = 8192
    //numberSamplesCode:2 -> NumberOfSamples = 16384
    //numberSamplesCode:3 -> NumberOfSamples = 32768
    
    - (void)measure {
        [icpsc_collect collectDataWithSamplingRate:0 withNumberOfSamples:0];
    }
    ...
             
  3. To request the full raw data array, use getsignalRawData method as follow:
  4. 
    ...
    - (void)getRawDataArray {
        NSLog(@"%@", [icpsc_collect getsignalRawData]);
    }
    ...
                        

    Below is a sample of a console log response:

  5. For this sample we will use the getOverallAccelerationRms method to calculate the acceleration overall rms in G's. there are other similar commands to request the velocity, displacement, etc
  6. 
    ...
    - (void)getOverallAccelerationRms {
        NSLog(@"acceleration overall value: %.4f G-rms", [icpsc_collect getOverallAccelerationRms]);
    }
    ...
                  

    Below is a sample of a console log response:


Combine this framework with vibEngine.framework to perform signal post-processing and with the vibeFDaD.framework to analize the machine condition. Third party frameworks can also be used to plot and enhance the users interface.


Changelog

See what's new added, changed, fixed, improved or updated in the latest versions.

Version 1.01 (11 Oct, 2021)

  • Fixed Issue with iOS®15 audio activation
  • Updated Optimized for iOS®15


Version 1.0 (15 Feb, 2021)

Initial Release