03-27-2023 02:35 AM
Hello, everyone! I'm new to labview and recently, do a project of multiple channel thermocouple using ADAM-6018. When I ran the program it shows error 56. My output is to get both data in the form of file and graph from multiple channel reads. Below I attach my program and error photo. In context, I'm using lv 2020. Is there any suggestion or somebody knows how to fix it?
Thank you,
03-27-2023 07:39 AM
The example VI cannot work without having the proper sub VIs which, as I suppose, are part of a ModBus VI set.
Error 56 is, as itself describes, a timeout error. I'm not familiar with that (supposed) ModBus VI set you are using as in the one I use I don't need to set up a TCP master, because the PC is already one. So my suspicion is that either port 502 is bad for the master or the master VI cannot connect to the local DHCP-IP. Try pinging the IP in a console window.
04-07-2023 10:48 AM
Hi Xaviff,
I have seen your VI.
Error 56 means a timeout error.
From the NI Website: This error indicates that the Modbus slave device did not respond to your read request within the timeout specified for the Modbus session.
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000fyuaSAA&l=en-SG
There are multiple mistakes inside it.
1) You do not have a Unit ID API which is required as each Modbus Slave Device comes with a unique Unit ID. You should link this right after Create Modbus Instance API.
2) You do not have a Shutdown Instance API in your VI! This is a fatal mistake! You need a shutdown instance API at the end of the loop you created.. otherwise, how can you terminate the modbus session??
3) There are multiple coercion dots in your VI, this should be avoided as good practice. Use the conversion of datatypes instead.
4) Your VI consists of the high-resolution relative seconds? What are you trying to achieve here? The intentions are not very clear.
Hope this helps.
Regards,
cyong
04-11-2023 02:13 AM
Hi,
The 'Write/Read' holding registers is using function code 23 (0x17) maybe your slave cannot handle this code.
I modified your VI by starting with a read, write and read of registers. This works.
Also added the Unit ID vi which is the ModBus slave number.
Let me know if this works when you replace is with you IP address and register values.
Kees