Experimental Physics and
| |||||||||||||||||
|
Hi Mark The device is sending a stream in 500ms that requests to send the data. But it also send a stream to just update the data of my records in this case it does not require the acknowledge means in response no stream and during this time it does not send the stream to send the data means interrupt stream to update my records also comes in 500ms. MAIN problem is that I can see the updating stream from my device in my terminal means my protocol file receives the data but it is not updating my records. Secondly, mostly it misses the interrupt stream. My st.cmd file is: #!../../bin/linux-x86_64/newtest ## You may have to change newtest to something else ## everywhere it appears in this file < envPaths cd "${TOP}" ## Register all support components dbLoadDatabase "dbd/newtest.dbd" newtest_registerRecordDeviceDriver pdbbase epicsEnvSet("STREAM_PROTOCOL_PATH", "/home/omar/epics/support/newtest/db") drvAsynSerialPortConfigure("L0","/dev/ttyS0",0,0,0) asynSetOption("L0", -1, "baud", "9600") asynSetOption("L0", -1, "bits", "8") asynSetOption("L0", -1, "parity", "none") asynSetOption("L0", -1, "stop", "1") ## Load record instances #dbLoadRecords("db/xxx.db","user=omar") dbLoadRecords("db/ccr-.db") #asynOctetSetInputEos("L0",0,"") #asynOctetSetOutputEos("L0",0,"") asynSetTraceIOMask("L0",0,0x4) asynSetTraceMask("L0",0,0x9) cd "${TOP}/iocBoot/${IOC}" iocInit ## Start any sequence programs #seq sncxxx,"user=omar" and my database file is : record (ai, "cmd-to-read"){ field(DESC, "Command to read value from PLC") field(DTYP, "stream") field(SCAN, ".1 second") 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, ".1 second") field(INP, "@ccr-cri.proto data-to-plc L0") } record (ai, "rod-status"){ field(DESC, "Command to decrease the position") field(DTYP, "stream") field(SCAN, ".1 second") field(INP, "@ccr-cri.proto data-to-plc L0") } record (ao, "cmd-to-send"){ field(DESC, "Current Step A1G1") field(DTYP, "stream") field(PINI, "YES") field(SCAN, ".1 second") #field(OMSL, "closed_loop") field(DOL, "cmd-to-read") field(OUT, "@ccr-cri.proto data-to-plc L0") } record (ao, "DPAO1014"){ field(DESC, "Current Step A1G1") field(DTYP, "stream") field(PINI, "YES") field(SCAN, ".1 second") #field(OMSL, "closed_loop") field(DOL, "AO1014") field(OUT, "@ccr-cri.proto data-to-plc L0") } The protocol file is: data-to-plc { MaxInput=14; in 0x01 "%(cmd-to-read.VAL)r" 0x08 "%(rod-addr.VAL)r" "%(rod-status.VAL)r" 0x00 0x00 0x00 0x00 0x00 0x00 0x00 "%#<modbus>"; out 0x01 0x05 0x80 0x00 "%(DPAO1014.VAL)#.2r" 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 "%#<modbus>"; } On Wed, Mar 16, 2016 at 3:02 AM, Mark Rivers <[email protected]> wrote:
| ||||||||||||||||
ANJ, 15 Jul 2016 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |