C sample automate program, Appendix c, Sample automate program – Rockwell Automation 61C345 4 Input 4-20mA Analog Rail Module User Manual

Page 43

Advertising
background image

CĆ1

Appendix C

Sample AutoMate Program

The following AutoMate program sequences can be used to interface to an

AutoMate Processor that does not support the AIN block. Over a period of four

scans, the program below inputs four channels from an Analog Rail module in

Rail mode.
Registers Used
0

Register that is configured to be updated at the end of scan.

40

Value input from channel 0

41

Value input from channel 1

42

Value input from channel 2

43

Value input from channel 3

44

Counter to select channel to operate this scan

45

Coils

Beginning of the Scan

If channel 0 was read in, put the data in register 40. The channel select bits are

cleared, but the underĆrange and overĆrange bits are left for later testing.

0.17

[Ă/Ă]

0.16

[Ă/Ă]

Ă45.00

(ăă)

EN

MOVM

EN

LENGTH: 1

SRC: 0

SCR2: K0011ă1111ă1111ă1111

DEST: 40

If channel 1 was read in, put the data in register 41.

0.17

[Ă/Ă]

0.16

[Ăăă]

Ă45.01

(ăă)

EN

MOVM

EN

LENGTH: 1

SRC: 0

SCR2: K0011ă1111ă1111ă1111

DEST: 41

Advertising