1
Open Discussion / Basic data logger 2 with unsignal register
« on: October 08, 2024, 04:14:15 AM »
How can I read a unsignal modbus register with basoc data logger 2? I have tryed put U40001 but its not working.
Thanks
Thanks
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
I don't know the Siemens protocols very well.
Could the Snap7 driver that was adapted for use with AHMI be used for Profibus DP?
https://www.advancedhmi.com/forum/index.php?topic=2722.msg18207#msg18207
The PLCAddressSelectColor2 works on a boolean value, so you can program the comparison in your PLC to set a boolean value.
The other option is to use some code:
- Add a DataSubscriber to the form
- Set PLCAddressValue to the register you want to use
- Double click the DataSubscriber to get back to code
- Enter this code:Code: [Select]if e.Values(0)=101 then
BasicIndicator1.ForColor=Color.Red
else
BasicIndicator1.ForColor=Color.White
end if
in conjunction with the subtract you want to use a logical AND.
ModbusTCPCom1.Write("40001", Value AND (65535 - 2 ^ (b_Num - 1)))
I can't test that right now, but the 65535 assumes it is an unsigned 16 bit integer, it may need to be a 32767