From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 56 at read holding registers

Hello everyone,

 

We have a E5DC Omron temperature controller that uses Modbus protocol.

I have labview 2014 and used VIPM to download the modbus library.

I need to do 3 things with this temperature controller :

1. Set the SP value

2. Set the ramp

3. Read the temperature

 

I want to start with the 3rd point. I'm totally new to Modbus and I've read the intro to Modbus on NI and watched some videos.

I created a master instance and entered the parameters corresponding to the controller.

I'm getting ERROR 56 at the read holding register and I don't get why.

For the input 0 is the 4-byte mode address (see below) and 1 is the number of holding registers, and then I want to display the T° value on a graph.

Here's the code and the highlight with the error.

 

ailita_0-1601298696351.pngailita_1-1601298732463.png

 

Thank you in advance

0 Kudos
Message 1 of 4
(1,285 Views)

First thought.  Are you sure you are using the correct slave address?  It looks like you are trying to talk to slave 1.  Is that how the device is set?

Are you sure your serial parameters are correct?  You are set for 9600 baud, no parity, no flow control.

 

What number of stop bits are you using?  The purple modbus libraries don't seem to have a setting for number of stop bits.  I don't know if it has a built-in assumption, or just grabs what ever value is assigned in MAX or the device manager.

 

I started using the "while" library from here years ago and it works well for me.  It is also in JKI VI Package Manager as "NI Modbus Library".  Though I know it assumes a setting of 1 stop bit in the MB Serial Init.vi, which did not work for a device I had.  So I did not use that MB serial Init and just configured it myself using the ordinary Serial VISA configure.  The purple library is based on objects and classes, so it hides a lot of details.  An important detail might be the serial port settings.

0 Kudos
Message 2 of 4
(1,245 Views)

Hello,

 

Thank you for your answer.

 

I checked that all the parameters are set correctly, it is slave 1, baud rate 9600, no parity and no flow control. Here are the communication specifications of the controller: 

ailita_0-1601362782261.png

" When the Protocol Setting parameter is set to Modbus, the communications data length must be 8 bits, and the communications stop bits must be 1 bit by setting the communications parity to Even/Odd or it must be 2 bits by setting the parity to None "

 

I changed the parity to Even, it didn't change anything still getting error 56.

 

I tried installing the library you attached but I don't know why it didn't work.

I have Labview 2014 14.0.1, so I used the 86 in the file, and I followed the steps of copying the files in the Labview folders but when I launched Labview nothing changed. (The computer I have Labview on doesn't have an internet connection, so I didn't have it on the VI package manager).

 

Thank you 

0 Kudos
Message 3 of 4
(1,222 Views)

You can browse to the folder and open up the libraries and drag in the VI's.

 

But I know the installation process also put some files in the folders for the palettes.

 

In Program Files (x86)\LabVIEW XXXX\user.lib, there should be a file called nimodbus.mnu  With that, the NI Modbus Library will show up in the User Libraries pallete.

 

 

0 Kudos
Message 4 of 4
(1,207 Views)