ni.com is currently experiencing slowness/issues due to ongoing maintenance.
Support teams are actively working on the soonest resolution.
ni.com is currently experiencing slowness/issues due to ongoing maintenance.
Support teams are actively working on the soonest resolution.
12-10-2018 03:34 PM - edited 12-10-2018 10:38 PM
Hi Smithd,
It looks like you left the Function Code stuff out of your Modbus API library on Version 1.2.1.42.
I had to manually go back and add this stuff back in the library. Any Reason this was left out?
Edit.... I'm not sure what happened, possibly when I was using your example custom function code creation, I accidentally modified the Modbus Master.lvclass and put this dependency in earlier...
Also, The latest version doesn't seem to run on the cRIO, so I went back 2 versions and now it works fine.
01-11-2019 07:09 AM
Several years ago I tried unsuccessfully to use the previous version to communicate with one master and two slaves using serial protocol. After several days of trying, was notified at that time that this was not possible. Has this issue been resolved in the current version? Now I am using an ActiveX library to do so (MBAXP) but need to connect another master to two clients using Modbus TCP. Is it as simple as configuring separate IP's and using different ports in the same vi?
Thanks,
Chris
02-06-2019 04:42 PM - edited 02-07-2019 10:22 AM
This is my first time posting to a forum. I hope I'm putting this question in the right place.
I am trying to communicate with an Automation Direct SOLO temperature controller (SL4824-LR) through LabVIEW using the LabVIEW Modbus API. The controller is connected to the computer through an RS-485 cable to a USB adapter. The device is recognized by the computer (Windows 10) as a COM port. I'm using LabVIEW 2017. This device is set as master with device id=1 and protocol=ASCII.
I have successfully communicated with the device using the attached code. I can read multiple registers to get the process value (current temperature, register 4097) and set value (set temperature, register 4098). Register values are found in section 7-3 of this manual. However, when I try to write a single register, I get error 538184: "<APPEND>Function 6".
I only need to read the current temperature, and I only need to write the set temperature. If you have any tips, I will appreciate them.
Note: A NI technical support person suggested that I try changing a register that has a defined allowed range, so I tried writing and reading register 4120 (device decimal place). This is what was saved in my vi. I get the same error though when trying to write and read 4098. Also note that the register address is N-1, so if trying to write to 4098, I input 4097.
Solution:
Thanks to Porter for finding a step I missed in the manual for the device. As shown on page 3-20 of the SOLO manual, the CoSH parameter must be set to ON in order for the device to accept commands through RS485. It now successfully set the temperature!
02-06-2019 05:43 PM
Not sure if it will help, but it looks like you are writing to register 4119 (not 4097) and reading from registers 4119 - 4127. Is that what you intend to do?
02-07-2019 04:51 AM
Thanks for your help Ben. I edited my original post with an explanation.
02-07-2019 09:24 AM
I would suggest that you setup a master modbus and a slave modbus on two computers using similar LabVIEW code like you have, and see if you can get them to talk to each other. Also check the computers Firewall to make sure the TCP/IP connection is allowed.
02-07-2019 10:00 AM
See page 3-20 of the user manual. Make sure that on-line configuration is set to on.
I would also recommend that you try communicating with the temperature controller using their configuration software first:
https://support.automationdirect.com/products/solo.html
Then try with LabVIEW.
02-07-2019 10:15 AM
Also note that PV is address 4096 and setpoint is address 4097 (not 4098).
02-07-2019 10:23 AM
Thanks Porter. You solved it. I revised my original post to show the solution. I just needed to turn the On-Line configuration. My apologies for missing that step in device setup, and many thanks for the suggestion!
05-08-2019 11:27 AM
This is my first time using the forum I hope I put this in the correct spot.
I am looking for a download of Modbus. the version of LabVIEW I have is 2017 sp1 f3