This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Filter modbus register
#13
(28.04.2021, 07:51)Daniel. Wrote: write_bitmask Boolean FW 2020.10 and newer

Set to true to enable writing shifted value to the register using value_bitmask. Only uint16 datatype is supported

Hello

the json file below makes me a strange thing, any bit I write in the LM always writes me only the first bit in the PLC.
the strange thing is that as far as the analog values are concerned, everything works perfectly.

Where am I wrong?

Code:
{
  "manufacturer": "SIEMENS",
  "description": "S7 1200",
  "mapping": [
    {"name": "SERRA 7 SP TEMP","address": 0,"bus_datatype": "float32","datatype": "float32","type": "register","units": " C°","writable": "true"},
    {"name": "SERRA 7 TEMP","address": 2,"bus_datatype": "float32","datatype": "float32","type": "register","units": " C°","writable": "true"},
    {"name": "SERRA 7 V_MAN_REG","address": 4,"bus_datatype": "float32","datatype": "float32","type": "register","units": " Hz","writable": "true"},
    {"name": "SERRA 7 ISTERESI","address": 6,"bus_datatype": "float32","datatype": "float32","type": "register","units": " C°","writable": "true"},
    {"name": "SERRA 7 ASS 1","address": 8,"bus_datatype": "float32","datatype": "float32","type": "register","units": " A","writable": "false"},
    {"name": "SERRA 7 ASS 2","address": 10,"bus_datatype": "float32","datatype": "float32","type": "register","units": " A","writable": "false"},
    {"name": "SERRA 7 A/M REG","address": 12,"read_swap":"bw","value_bitmask":"0x1","bus_datatype": "bool","datatype": "uint16","type": "register","writable": "true"},
    {"name": "SERRA 7 CMD INV 1","address": 12,"read_swap":"bw","value_bitmask":"0x2","bus_datatype": "bool","datatype": "uint16","type": "register","writable": "true"},
    {"name": "SERRA 7 RUN INV 1","address": 12,"read_swap":"bw","value_bitmask":"0x4","bus_datatype": "bool","datatype": "uint16","type": "register","writable": "true"},    
    {"name": "SERRA 7 ALM INV 1","address": 12,"read_swap":"bw","value_bitmask":"0x8","bus_datatype": "bool","datatype": "uint16","type": "register","writable": "true"},    
    {"name": "SERRA 7 ACK INV 1","address": 12,"read_swap":"bw","value_bitmask":"0x10","bus_datatype": "bool","datatype": "uint16","type": "register","writable": "true"},
    {"name": "SERRA 7 CMD INV 2","address": 12,"read_swap":"bw","value_bitmask":"0x20","bus_datatype": "bool","datatype": "uint16","type": "register","writable": "true"},
    {"name": "SERRA 7 RUN INV 2","address": 12,"read_swap":"bw","value_bitmask":"0x40","bus_datatype": "bool","datatype": "uint16","type": "register","writable": "true"},    
    {"name": "SERRA 7 ALM INV 2","address": 12,"read_swap":"bw","value_bitmask":"0x80","bus_datatype": "bool","datatype": "uint16","type": "register","writable": "true"},    
    {"name": "SERRA 7 ACK INV 2","address": 12,"read_swap":"bw","value_bitmask":"0x100","bus_datatype": "bool","datatype": "uint16","type": "register","writable": "true"},
    {"name": "SERRA 8 SP TEMP","address": 14,"bus_datatype": "float32","datatype": "float32","type": "register","units": " C°","writable": "true"},
    {"name": "SERRA 8 TEMP","address": 16,"bus_datatype": "float32","datatype": "float32","type": "register","units": " C°","writable": "true"},
    {"name": "SERRA 8 V_MAN_REG","address": 18,"bus_datatype": "float32","datatype": "float32","type": "register","units": " Hz","writable": "true"},
    {"name": "SERRA 8 ISTERESI","address": 20,"bus_datatype": "float32","datatype": "float32","type": "register","units": " C°","writable": "true"},
    {"name": "SERRA 8 ASS 1","address": 22,"bus_datatype": "float32","datatype": "float32","type": "register","units": " A","writable": "false"},
    {"name": "SERRA 8 ASS 2","address": 24,"bus_datatype": "float32","datatype": "float32","type": "register","units": " A","writable": "false"},
    {"name": "SERRA 8 A/M REG","address": 26,"read_swap":"bw","value_bitmask":"0x1","bus_datatype": "bool","datatype": "uint16","type": "register","writable": "true"},
    {"name": "SERRA 8 CMD INV 1","address": 26,"read_swap":"bw","value_bitmask":"0x2","bus_datatype": "bool","datatype": "uint16","type": "register","writable": "true"},
    {"name": "SERRA 8 RUN INV 1","address": 26,"read_swap":"bw","value_bitmask":"0x4","bus_datatype": "bool","datatype": "uint16","type": "register","writable": "true"},    
    {"name": "SERRA 8 ALM INV 1","address": 26,"read_swap":"bw","value_bitmask":"0x8","bus_datatype": "bool","datatype": "uint16","type": "register","writable": "true"},    
    {"name": "SERRA 8 ACK INV 1","address": 26,"read_swap":"bw","value_bitmask":"0x10","bus_datatype": "bool","datatype": "uint16","type": "register","writable": "true"},
    {"name": "SERRA 8 CMD INV 2","address": 26,"read_swap":"bw","value_bitmask":"0x20","bus_datatype": "bool","datatype": "uint16","type": "register","writable": "true"},
    {"name": "SERRA 8 RUN INV 2","address": 26,"read_swap":"bw","value_bitmask":"0x40","bus_datatype": "bool","datatype": "uint16","type": "register","writable": "true"},    
    {"name": "SERRA 8 ALM INV 2","address": 26,"read_swap":"bw","value_bitmask":"0x80","bus_datatype": "bool","datatype": "uint16","type": "register","writable": "true"},    
    {"name": "SERRA 8 ACK INV 2","address": 26,"read_swap":"bw","value_bitmask":"0x100","bus_datatype": "bool","datatype": "uint16","type": "register","writable": "true"},
    {"name": "SERRA 9 SP TEMP","address": 28,"bus_datatype": "float32","datatype": "float32","type": "register","units": " C°","writable": "true"},
    {"name": "SERRA 9 TEMP","address": 30,"bus_datatype": "float32","datatype": "float32","type": "register","units": " C°","writable": "true"},
    {"name": "SERRA 9 V_MAN_REG","address": 32,"bus_datatype": "float32","datatype": "float32","type": "register","units": " Hz","writable": "true"},
    {"name": "SERRA 9 ISTERESI","address": 34,"bus_datatype": "float32","datatype": "float32","type": "register","units": " C°","writable": "true"},
    {"name": "SERRA 9 ASS 1","address": 36,"bus_datatype": "float32","datatype": "float32","type": "register","units": " A","writable": "false"},
    {"name": "SERRA 9 ASS 2","address": 38,"bus_datatype": "float32","datatype": "float32","type": "register","units": " A","writable": "false"},
    {"name": "SERRA 9 A/M REG","address": 40,"read_swap":"bw","value_bitmask":"0x1","bus_datatype": "bool","datatype": "uint16","type": "register","writable": "true"},
    {"name": "SERRA 9 CMD INV 1","address": 40,"read_swap":"bw","value_bitmask":"0x2","bus_datatype": "bool","datatype": "uint16","type": "register","writable": "true"},
    {"name": "SERRA 9 RUN INV 1","address": 40,"read_swap":"bw","value_bitmask":"0x4","bus_datatype": "bool","datatype": "uint16","type": "register","writable": "true"},    
    {"name": "SERRA 9 ALM INV 1","address": 40,"read_swap":"bw","value_bitmask":"0x8","bus_datatype": "bool","datatype": "uint16","type": "register","writable": "true"},    
    {"name": "SERRA 9 ACK INV 1","address": 40,"read_swap":"bw","value_bitmask":"0x10","bus_datatype": "bool","datatype": "uint16","type": "register","writable": "true"},
    {"name": "SERRA 9 CMD INV 2","address": 40,"read_swap":"bw","value_bitmask":"0x20","bus_datatype": "bool","datatype": "uint16","type": "register","writable": "true"},
    {"name": "SERRA 9 RUN INV 2","address": 40,"read_swap":"bw","value_bitmask":"0x40","bus_datatype": "bool","datatype": "uint16","type": "register","writable": "true"},    
    {"name": "SERRA 9 ALM INV 2","address": 40,"read_swap":"bw","value_bitmask":"0x80","bus_datatype": "bool","datatype": "uint16","type": "register","writable": "true"},    
    {"name": "SERRA 9 ACK INV 2","address": 40,"read_swap":"bw","value_bitmask":"0x100","bus_datatype": "bool","datatype": "uint16","type": "register","writable": "true"}
]
}

Thanks so much

Code:
Thanks so much
Reply


Messages In This Thread
Filter modbus register - by Frank68 - 27.04.2021, 12:06
RE: Filter modbus register - by Daniel - 27.04.2021, 12:17
RE: Filter modbus register - by Frank68 - 27.04.2021, 12:26
RE: Filter modbus register - by Daniel - 27.04.2021, 12:29
RE: Filter modbus register - by Frank68 - 27.04.2021, 13:07
RE: Filter modbus register - by Daniel - 27.04.2021, 13:13
RE: Filter modbus register - by Frank68 - 27.04.2021, 14:03
RE: Filter modbus register - by admin - 27.04.2021, 14:11
RE: Filter modbus register - by Frank68 - 27.04.2021, 16:25
RE: Filter modbus register - by Daniel - 27.04.2021, 19:49
RE: Filter modbus register - by Frank68 - 28.04.2021, 06:15
RE: Filter modbus register - by Daniel - 28.04.2021, 07:51
RE: Filter modbus register - by Frank68 - 28.04.2021, 09:25
RE: Filter modbus register - by Daniel - 28.04.2021, 09:29
RE: Filter modbus register - by Frank68 - 28.04.2021, 10:01

Forum Jump: