![]() |
![]() ![]()
Experimental Physics and
| ||||||||||||||
|
Hi All,
I am using a Wago PLC and Epics asyn-R4-43/Modbus R3-2, and I am seeing some differences in the FC2 reads depending on the Wago module that is used. If the 750-400/500 series module DO/DI are used, the reads come back as expected, but if the 750-1400/1500 series are used there is a bit swap when reading. Here is my current Asyn port configuration, I have tried the different data types as enums and strings but that doesn't change anything. I can make it work, just trying to understand why I get the bit swap when using different modules on the PLC. Here is my config: cmd file: # Bit read access, Function code 2 drvModbusAsynConfigure("FC2", "sim1", 0, 2, 0, 32, 0, 100, "Wago") and the db record # bi record template for register inputs record(bi,"$(P)$(R)") { field(DTYP,"asynUInt32Digital") field(INP,"@asynMask($(PORT) $(OFFSET) 0x1)") field(SCAN,"$(SCAN)") field(ZNAM,"$(ZNAM)") field(ONAM,"$(ONAM)") field(ZSV,"$(ZSV)") field(OSV,"$(OSV)") } and my substitutions file: # READ COILS - FUNCTION CODE 2 # Reads WAGO MB Output Bits file "$(MODBUS)/db/bi_bit.jeff.template" { pattern {P, R, PORT, OFFSET, ZNAM, ONAM, ZSV, OSV, SCAN} {SIM1:, FC2_0, FC2, 0, Low, High, NO_ALARM, MAJOR, "1 second"} {SIM1:, FC2_1, FC2, 1, Low, High, NO_ALARM, MAJOR, "1 second"} {SIM1:, FC2_2, FC2, 2, Low, High, NO_ALARM, MAJOR, "1 second"} {SIM1:, FC2_3, FC2, 3, Low, High, NO_ALARM, MAJOR, "1 second"} {SIM1:, FC2_4, FC2, 4, Low, High, NO_ALARM, MAJOR, "1 second"} {SIM1:, FC2_5, FC2, 5, Low, High, NO_ALARM, MAJOR, "1 second"} {SIM1:, FC2_6, FC2, 6, Low, High, NO_ALARM, MAJOR, "1 second"} {SIM1:, FC2_7, FC2, 7, Low, High, NO_ALARM, MAJOR, "1 second"} {SIM1:, FC2_8, FC2, 8, Low, High, NO_ALARM, MAJOR, "1 second"} {SIM1:, FC2_9 FC2, 9, Low, High, NO_ALARM, MAJOR, "1 second"} {SIM1:, FC2_10, FC2, 10, Low, High, NO_ALARM, MAJOR, "1 second"} {SIM1:, FC2_11, FC2, 11, Low, High, NO_ALARM, MAJOR, "1 second"} {SIM1:, FC2_12, FC2, 12, Low, High, NO_ALARM, MAJOR, "1 second"} {SIM1:, FC2_13, FC2, 13, Low, High, NO_ALARM, MAJOR, "1 second"} {SIM1:, FC2_14, FC2, 14, Low, High, NO_ALARM, MAJOR, "1 second"} {SIM1:, FC2_15, FC2, 15, Low, High, NO_ALARM, MAJOR, "1 second"} }
| ||||||||||||||
ANJ, 06 May 2025 |
![]() · Download · Search · IRMIS · Talk · Documents · Links · Licensing · |