Gathering analog input data using Flexslice Ain Module

Gathering analog input data using Flexslice Ain Module

A Visual Studio program connecting over Ethernet will not be deterministic. So there will be timing errors.

The built-in SCOPE command can be used to log data. It will save data to TABLE at the servo cycle rate. So if SERVO_PERIOD is 1000 usec, then to save values at 0.05 second intervals use this command:

'SCOPE(enable, period, table_start, table_stop, p0 [,p1..... )

SCOPE(ON, 50, 1000, 1099, AIN0) ' this will log 100 values from analgue input 0 at 50 msec intervals.
TRIGGER ' start the recording

WAIT UNTIL SCOPE_POS = 1099

now the data is ready to uploaded from TABLE(1000) to TABLE(1099)
    • Related Articles

    • Flexslice 24V digital input levels

      The P372 PNP 16 x Digital Input module has input threshold values to work with standard PLC IO systems.  If the input is below 5V then the input is OFF.  If the input is above 15V then the input will register as ON.
    • Motion Perfect problem when SCOPE command is used

      When running the SCOPE command in a program, I think Motion Perfect doesn't like the SCOPE command being issued over and over when I run it. It seems more stable when I comment the SCOPE command out after it's ran once. ...
    • AN-428 Analog I/O resolution change for Flexslices

      This application note explains how to change the range for Voltage signal on the Flexslice module: The P378 & P379 has Signal Voltage option of 1) -5V to +5V 2) -10V to +10V 3) 0V to 5V 4) 0V to 10V
    • Thermocouple Flexslice Module - P367

      P367 (Basic) Thermocouple Flexslice Module Attached is the Application Technote and example program to help in getting started. VR assignment is commented to correspond with the Application Technote. Drop Files to Attach
    • How many Flexslice modules can I fit to the P366 coupler?

      The EBUS power source from the coupler and Flex-6 Nano at 40 degrees celcius are: P600 : 2700 mA maximum. P366 : 2860 mA maximum. The maximum number of modules is defined by the power on the EBUS and the propagation times over the EBUS data ...