Experimental Physics and
| |||||||||||||||
|
Hi My IOC (as client) is communicating with the PLC (as master). PLC is continuously requesting to send data after 500ms with cmd-to-read=0x05 but it can request to update the data any time with cmd-to-read=0x01 or 0x02 or 0x03, in this case rod-status value is also updated. My Protocol file and records are following:ExtraInput = Ignore; data-to-plc { MaxInput=14; in 0x01 "%r" 0x08 "%(\$1)r" "%(\$2)r" 0x00 0x00 0x00 0x00 0x00 0x00 0x00 "%#<modbus>"; # in 0x01 "%(cmd-to-read.VAL)r" 0x08 "%(rod-addr.VAL)r" "%(rod-status.VAL)r" 0x00 0x00 0x00 0x00 0x00 0x00 0x00 "%#<modbus>"; } record (ai, "cmd-to-read"){ field(DESC, "Command to read value from PLC") field(DTYP, "stream") field(SCAN, ".5 second") # field(SCAN, "I/O Intr") field(INP, "@ccr-cri.proto data-to-plc(rod-addr,rod-status,) L0") # field(INP, "@ccr-cri.proto data-to-plc L0") } record (ai, "rod-addr"){ field(DESC, "Command to increase the position") # field(DTYP, "stream") # field(SCAN, "Passive") # field(SCAN, "I/O Intr") # field(INP, "@ccr-cri.proto data-to-plc L0") # field(FLNK, "cmd-to-read") } record (ai, "rod-status"){ field(DESC, "Command to decrease the position") # field(DTYP, "stream") # field(SCAN, "Passive") # field(SCAN, "I/O Intr") # field(INP, "@ccr-cri.proto data-to-plc L0") I use different combination to SCAN the records and face following problem:# field(FLNK, "cmd-to-read") }
| ||||||||||||||
ANJ, 15 Jul 2016 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |