LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus RTU. Error 6101 occurs by reading from PID controller

Hi,

 

could you please post the code you are using currently? I would like to take a look into it.

 

Best,

Melanie

Best regards,
Melanie Eisfeld
Senior Applications Engineer, National Instruments Germany
Certified LabVIEW Developer
Certified TestStand Architect
0 Kudos
Message 11 of 18
(1,509 Views)

Hi 

The document doesn`t help unfortunately. 

I am attaching the code which I am using but it hasn't changed a lot since my first post. 

 

Thanks

Lukas

0 Kudos
Message 12 of 18
(1,472 Views)

Hi stiefel,

 

try to initialize the boolean value you are passing to the function MB Serial Master Query Read.

Maybe this might generate the timeout error.

 

Kind regards,

 

Pep

0 Kudos
Message 13 of 18
(1,435 Views)

ModbusRead.png

Try reading Holding registers instead of input registers.. Also use a bundle by name for your cluster.

0 Kudos
Message 14 of 18
(1,413 Views)

Hi 

Thank you for your help. I rebuilt the program as Dave has mentioned and still get the

error -1073807298 ocurred at VISA Read in MB Serial Receive.vi:3-> MB Serial Master Query.vi:2->PID-Read.vi

Possible reasons:

Visa: (Hex 0xBFFF003E) Coud not perform operation because of I/O error. 

 

I get this same error using the set_temperature.vi and it still sets the temperature correctly. The controller also shows a little light indicating communication over the interface when running any of the programms.

So the same error as before which I have mentionend in Message 9. Any suggestions how to resolve that problem? 

Regards 

Lukas 

 

 

0 Kudos
Message 15 of 18
(1,370 Views)

Have you tried increasing the timeout value? What is it set at? Also is your address the same for unit ID in the controller? You can by sending a broadcast "Unit 0" and all will except the values for setpoints (Writes) but if you request data from a controller and it does not have the same ID it will not respond.  The slave Address must be the same as what is set in your controller. 

0 Kudos
Message 16 of 18
(1,362 Views)

The timeout value is set to 10000 and I have tried increasing it but it doesn't make a difference. Anyway I am not getting a timeout error right now. 
The slave address of the controller is set to 2. When I am using the programm "Simply Modbus Master" communication works fine.

Thanks for your efforts. 

0 Kudos
Message 17 of 18
(1,348 Views)

If you can use a different controller Automation direct has a good selection. I use Automation Direct Solo temperature controllers with the same NI modbus library and it works very well.  Automation direct makes a modbus serial to modbus Ethernet gateway. It works very well. This eliminates a lot of the serial port problems with converters and also allows for setting up polling of slaves in the gateway. 

0 Kudos
Message 18 of 18
(1,330 Views)