06-03-2024 06:02 AM
Hello, i have been having issues with the connection to a modbus tcp slave gateway (HD67508-A1-485). The code is really simple and the connection works perfectly with MODBUS POLL (using the exact same register address as the labVIEW code below). Im using the free modbus library.
As i dont think the archives are needed, here is the labview code, the working Modbus Poll configuration and the ERROR 56 (exiting while).
The problem is probably related to the slave ID and the initialization of the tcp instance.
Thannk you for your time!
If anyone needs further information pls let me know.
:
Solved! Go to Solution.
06-03-2024 08:30 AM
your code keeps writing on the register every 20 ms.
Do you need to repeatedly write at this frame rate ? I wonder if you increase the time between writting if the error will go away.
06-03-2024 09:11 AM
What does the manual say about the registers, are they starting from 0 or from 1 ?
Could be a misalignment, so have you tried address 2000?
LabVIEW modbus has the address input as 0 based, but some models/devices has there address in manuals start at 1.
06-04-2024 04:33 AM
Problem solved, it was related to timings and termination. Seems like i can now have the program working well with 20ms but had to turn it to 2000ms for it to work without termination.
Thanks!!
06-04-2024 04:36 AM
dkfire, in this case register is set by a translate table. It works well now with register 2001, still, i will keep it in mind for other projects, seems like a really usual cause of error.
Thank you for the answer!