Instruction
Instruction
JP #C,@AN[1]>2
Jump to A if analog input number 1 is greater than 2 volts
MG@AN[2]
Display the analog voltage reading on input 2
AA 1,4.5,0
Wait until the voltage on input 1 goes above 4.5V
AA 1,3.2,1
Wait until the voltage on input 1 goes below 3.2V
Analog Outputs
Analog output voltage is set with the AO command. The AO command has the format AO m,n where m is
the output pin and n is the voltage assigned to it. The analog output voltage is accessed with the @AO[n]
function where n is the analog output channel. Analog output modules come with a resolution of 12 bits
(16bit optional). The standard voltage range is 0 to +5VDC for the RIO-47100. The Analog Output voltage
range is configurable using the DQ command when using the RIO-47120. Use the ID command to see the
model number of the RIO.
Note: When analog output values are accessed from the Data Record or from the Record Array function, the
returned value will be an integer number that represents the analog voltage. For a RIO-47100, the equation
used to determine the decimal equivalent of the analog voltage is as follows:
N= ((V-Vlo)*4095)/(Vhi-Vlo)
Where N is the integer equivalent of the analog voltage, V is the expected analog voltage, Vlo is the lowest
voltage in the total range (0V for the standard analog input module) and Vhi is the highest voltage in the total
range (5V for the standard module).
These integer values will also be returned when accessing the analog inputs by the API calls in C/C++ or
Visual Basic.
The AO command can also be used to set the analog voltage on ModBus devices over Ethernet
Instruction
Instruction
AO 7,1.5
Set the output voltage on output 7 to 1.5V
MG@AO[2]
Display the analog voltage reading on output 2
Real Time Clock
The RIO-471x2 firmware revision D and above is equipped with a real time clock feature. The real time
clock provides true time in seconds, minutes and hours. The RT command provides a method to set the time
and operands to return the current time. The default real time clock does not persist through a power cycle
and must be set whenever power is restored.
The RIO-471x2 can be ordered with a clock upgrade (-RTC) including a higher precision clock than the
default, and a battery backup for the time hardware. All hardware is within the standard sheet metal
footprint. The –RTC clock will continue to run when power is removed from the RIO. The –RTC option
also provides a calendar function including year, month of year, day of month, and day of week. This feature
can be set and queried through the RY command.
Both versions of the RIO-471x2 real time clock can be set to a TIME protocol (RFC 868) server. Using IH,
the RIO can connect to a TIME server over TCP on port 37 and receive the 32bit response. The firmware
will then set the time and calendar (if applicable) to the TIME server value. The command RO is used to set
the GMT time zone offset for localization of the current time. The TIME protocol synchronization is
designed to connect to a server on the local network. Contact Galil if a local server is not available (e.g. an
Internet Gateway is required to contact NIST).
See the -RTC section in the Appendix for further details and specifications for the real time clock.
74 Chapter 5 Programming
RIO-47xxx
Содержание RIO-47120
Страница 2: ......
Страница 93: ...RIO Dimensions RIO 471xx Units in centimeters RIO 47xxx Appendix 87...
Страница 94: ...RIO 472xx Units in millimeters 88 Appendix RIO 47xxx...
Страница 107: ...Internal 56 64 Zero Stack 53 RIO 47xxx Index 101...