Hi, all
for communication with PLC via using modbus, I used modbusR2-5 version. i found one problem. here is 4 functions that InFunction A,B and OutFunctions C, D. they access same memory. After I changed memory data via using OutFunction C or D, data of InFunctions A, B updated automatically (this is written on manual), but data of OutFunctions C, D didn't updated automatically. I wonder if it is possible to update data of the other OutFunctions automatically. below is my log data. [sjr@localhost ~]$ caget CIS:TRANS1:YWIn1 CIS:TRANS1:YWIn1 0 [sjr@localhost ~]$ caget CIS:TRANS1:YWOut1 CIS:TRANS1:YWOut1 0 [sjr@localhost ~]$ caget CIS:TRANS1:YBIn1_1 CIS:TRANS1:YBIn1_1 Low [sjr@localhost ~]$ caget CIS:TRANS1:YBOut1_1 CIS:TRANS1:YBOut1_1 Low [sjr@localhost ~]$ caput CIS:TRANS1:YBOut1_1 1 Old : CIS:TRANS1:YBOut1_1 Low New : CIS:TRANS1:YBOut1_1 High [sjr@localhost ~]$ caget CIS:TRANS1:YBIn1_1 CIS:TRANS1:YBIn1_1 High [sjr@localhost ~]$ caget CIS:TRANS1:YWIn1 CIS:TRANS1:YWIn1 2 [sjr@localhost ~]$ caget CIS:TRANS1:YWOut1 CIS:TRANS1:YWOut1 0 [sjr@localhost ~]$ caput CIS:TRANS1:YWOut1 0 Old : CIS:TRANS1:YWOut1 0 New : CIS:TRANS1:YWOut1 0 [sjr@localhost ~]$ caget CIS:TRANS1:YWIn1 CIS:TRANS1:YWIn1 0 [sjr@localhost ~]$ caget CIS:TRANS1:YBOut1_1 CIS:TRANS1:YBOut1_1 High [sjr@localhost ~]$ |
and this is substitutions. # These are the Yn inputs done with bit access Y0-Y7 file "../../db/bi_bit.template" { pattern {P, R, PORT, OFFSET, ZNAM, ONAM, ZSV, OSV, SCAN} {CIS:TRANS1:, YBIn1_0, T1_Yn_In_Bit, 0x10, Low, High, NO_ALARM, MAJOR, "I/O Intr"} {CIS:TRANS1:, YBIn1_1, T1_Yn_In_Bit, 0x11, Low, High, NO_ALARM, MAJOR, "I/O Intr"} } file "../../db/intarray_in.template" { pattern {P, R, PORT, NELM, SCAN} {CIS:TRANS1:, YBIn0Array, T1_Yn_In_Bit, 32, "I/O Intr"} } file "../../db/asynRecord.template" { pattern {P, R, PORT, ADDR, TMOD, IFACE} {CIS:TRANS1:, YBIn0Asyn, T1_Yn_In_Bit, 0, Read, asynUInt32Digital} } file "../../db/statistics.template" { pattern {P, R, PORT, SCAN} {CIS:TRANS1:, YBIn0St, T1_Yn_In_Bit, "10 second"} } file "../../db/poll_delay.template" { pattern {P, R, PORT} {CIS:TRANS1:, YBIn0PollDelay, T1_Yn_In_Bit} }
file "../../db/mbbiDirect.template" { pattern {P, R, PORT, OFFSET, MASK, SCAN} {CIS:TRANS1:, YWIn0, T1_Yn_In_Word, 0x0, 0xFFFF, "I/O Intr"} {CIS:TRANS1:, YWIn1, T1_Yn_In_Word, 0x1, 0xFFFF, "I/O Intr"} } file "../../db/intarray_in.template" { pattern {P, R, PORT, NELM, SCAN} {CIS:TRANS1:, YWIn0Array, T1_Yn_In_Word, 80, "I/O Intr"} } file "../../db/asynRecord.template" { pattern {P, R, PORT, ADDR, TMOD, IFACE} {CIS:TRANS1:, YWIn0Asyn, T1_Yn_In_Word, 0, Read, asynInt32} } file "../../db/statistics.template" { pattern {P, R, PORT, SCAN} {CIS:TRANS1:, YWIn0St, T1_Yn_In_Word, "10 second"} } file "../../db/poll_delay.template" { pattern {P, R, PORT} {CIS:TRANS1:, YWIn0PollDelay, T1_Yn_In_Word} } # These are the Yn outputs done with bit access. Y0-Y7 file "../../db/bo_bit.template" { pattern {P, R, PORT, OFFSET, ZNAM, ONAM} {CIS:TRANS1:, YBOut1_0, T1_Yn_Out_Bit, 0x10, Low, High} {CIS:TRANS1:, YBOut1_1, T1_Yn_Out_Bit, 0x11, Low, High} } file "../../db/asynRecord.template" { pattern {P, R, PORT, ADDR, TMOD, IFACE} {CIS:TRANS1:, YBOut0Asyn, T1_Yn_Out_Bit, 0, Read, asynUInt32Digital} } file "../../db/statistics.template" { pattern {P, R, PORT, SCAN} {CIS:TRANS1:, YBOut0, T1_Yn_Out_Bit, "10 second"} } file "../../db/poll_delay.template" { pattern {P, R, PORT} {CIS:TRANS1:, YBOut0PollDelay, T1_Yn_Out_Bit} }
file "../../db/mbboDirect.template" { pattern {P, R, PORT, OFFSET, MASK, SCAN} {CIS:TRANS1:, YWOut0, T1_Yn_Out_Word, 0x0, 0xFFFF, "I/O Intr"} {CIS:TRANS1:, YWOut1, T1_Yn_Out_Word, 0x1, 0xFFFF, "I/O Intr"} } file "../../db/asynRecord.template" { pattern {P, R, PORT, ADDR, TMOD, IFACE} {CIS:TRANS1:, YWOut0Asyn, T1_Yn_Out_Word, 0, Read, asynInt32} } file "../../db/statistics.template" { pattern {P, R, PORT, SCAN} {CIS:TRANS1:, YWOut0St, T1_Yn_Out_Word, "10 second"} } file "../../db/poll_delay.template" { pattern {P, R, PORT} {CIS:TRANS1:, YWOut0PollDelay, T1_Yn_Out_Word} }
|
and this is st.cmd files drvAsynIPPortConfigure("Trans1","192.168.1.10:502",0,0,1) modbusInterposeConfig("Trans1",0,5000,0)
# Read 32 bits. Function code=1. drvModbusAsynConfigure("T1_Yn_In_Bit", "Trans1", 0, 1, 17600, 040, 0, 100, "LSIS_PLC")
# Write 32 bits. Function code=5. drvModbusAsynConfigure("T1_Yn_Out_Bit", "Trans1", 0, 5, 17600, 040, 0, 100, "LSIS_PLC")
# Read 80 words (128 bits). Function code=3. drvModbusAsynConfigure("T1_Yn_In_Word", "Trans1", 0, 3, 1100, 80, 0, 100, "LSIS_PLC")
# Write 80 words (128 bits). Function code=6. drvModbusAsynConfigure("T1_Yn_Out_Word", "Trans1", 0, 6, 1100, 80, 0, 100, "LSIS_PLC")
|
and this is my epics environment. epics> epicsParamShow EPICS_AR_PORT: 7002 EPICS_CAS_AUTO_BEACON_ADDR_LIST is undefined EPICS_CAS_BEACON_ADDR_LIST is undefined EPICS_CAS_BEACON_PERIOD is undefined EPICS_CAS_BEACON_PORT is undefined EPICS_CAS_IGNORE_ADDR_LIST is undefined EPICS_CAS_INTF_ADDR_LIST is undefined EPICS_CAS_SERVER_PORT is undefined EPICS_CA_ADDR_LIST: 100.100.10.255 192.168.1.255 10.10.10.255 EPICS_CA_AUTO_ADDR_LIST: NO EPICS_CA_BEACON_PERIOD: 15.0 EPICS_CA_CONN_TMO: 30.0 EPICS_CA_MAX_ARRAY_BYTES: 1000000000 EPICS_CA_MAX_SEARCH_PERIOD: 300.0 EPICS_CA_NAME_SERVERS is undefined EPICS_CA_REPEATER_PORT: 5065 EPICS_CA_SERVER_PORT: 5064 EPICS_CMD_PROTO_PORT is undefined EPICS_IOC_LOG_FILE_COMMAND is undefined EPICS_IOC_LOG_FILE_LIMIT: 1000000 EPICS_IOC_LOG_FILE_NAME is undefined EPICS_IOC_LOG_INET is undefined EPICS_IOC_LOG_PORT: 7004 EPICS_TIMEZONE: CUS::360:031302:110602 EPICS_TS_NTP_INET is undefined IOCSH_HISTSIZE: 50 IOCSH_PS1: epics>
|
Best Regards,
JaeRyong
- Replies:
- RE: data of modbus write function didn't updated automatically Mark Rivers
- Navigate by Date:
- Prev:
RE: Stream device problem with redirection in @mismatch Mazanec Tomáš
- Next:
Re: STAT=SCAN recover Isabella Rey
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
<2015>
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
RE: EPICS UIs in the context of changing enum record identifiers Jameson Graef Rollins
- Next:
RE: data of modbus write function didn't updated automatically Mark Rivers
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
<2015>
2016
2017
2018
2019
2020
2021
2022
2023
2024
|