LM master modbus, PLC slave - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Gateway (https://forum.logicmachine.net/forumdisplay.php?fid=10) +--- Thread: LM master modbus, PLC slave (/showthread.php?tid=5731) |
LM master modbus, PLC slave - Simuzer - 09.11.2024 hi all. I have a modbus project that LM is Master and Wago PLC Slave. Using word and bits.. I read and write data as word but i don't read and write any bit of word.. I dont use modbus mapping . I love script more easy. Code: require('luamodbus') RE: LM master modbus, PLC slave - CristianAgata - 10.11.2024 Hi, Look at this if can help you. https://forum.logicmachine.net/showthread.php?tid=5510&highlight=Bit+mask BR Cristian RE: LM master modbus, PLC slave - Simuzer - 10.11.2024 Thank you for your reply. But thats not work correctly. When changing one bit, the other bits should not change. (10.11.2024, 08:13)CristianAgata Wrote: Hi, RE: LM master modbus, PLC slave - admin - 11.11.2024 That's exactly why you should use profiles because it's already handled there You are using logical and / or in your script. Use bit.band / bit.bor instead. |