Showing results for 
Search instead for 
Did you mean: 

Modbus I/O

Go to solution


I'm using LabVIEW to monitor a process to connect my sensors to LabVIEW I'm using a Modbus serial RTU 8AI/4AO DAQ card and when I make a modbus I/O server and use the address 30001 as my first AI, which is connected to a sensor, after displaying the value of my sensor for a few seconds in a numeric indicator then suddenly this error(1967353906) pops up for just one time

  • IMG_20200912_180706_633.jpgand after that the next error(1950679038) pops up constantly and stops the program but my value still changes in the NI Distributed system manger 
  • IMG_20200912_180708_704.jpg

I will be grateful if someone helps me to solve this issue 

0 Kudos
Message 1 of 10

Descriptions for your errors can be found on the following pages:


It's impossible to tell what your code is doing from your screenshot.  But the errors indicate something is interrupting communications.  


Upload your code.  



Patrick Allen:
0 Kudos
Message 2 of 10

Hi dear Pallen

Thank you for your help 

These are the pictures of my VI and my block diagram 



As you can see it is just a simple code to display the value of my flow  meter on an indicator. I have no idea why this error pops up approximately every 20 seconds and after clicking on continue button of the error for a few times, it continues to work again properly but then again after a few seconds the error pops up.

But I can see the value of my DAQ card in NI Distributed System Manger properly without any interruptions.



0 Kudos
Message 3 of 10

Unfortunately. I can't tell anything from a picture of your code. 


If you attach your VIs, myself and other folks on the board can look at your actual code and possibly tell you what is wrong. 


It's important to include your code if you are looking for help with an error.  


Some of the very best LabVIEW programmers on this board will simply ignore your post if you do not include your code.  They can't help if they can't see what you did and most are not going to try figure out what your code "might" be from a picture.  


My best guess from the picture.....some kind of timeout? 

Patrick Allen:
0 Kudos
Message 4 of 10
Accepted by topic author Reza77

Is it okay if you don't get the value at that instant if you are able to get it again later?


Put the indicator in a case structure.  Wire the error from the variable to the case structure so that it handles the error and updates the display if you receive the value without error.

0 Kudos
Message 5 of 10

Here's my VI files

0 Kudos
Message 6 of 10


Your solution seems to work.

Thanks a lot, you've saved me a lot of time, appreciate it. 

0 Kudos
Message 7 of 10

Hi again 

Your solution worked pretty well for displaying the value of my sensor, but now I want to control my process with PID controller in LabVIEW, a problem has appeared. 

The problem is the value of the process value of PID controller turns to zero every a few seconds when that mentioned error appears and it interrupts the output value of the PID controller 

I will be grateful If you can suggest a solution for this problem too

0 Kudos
Message 8 of 10
Accepted by topic author Reza77

The controller should be in the case structure so that you don't send it a zero on error.


Now I don't know how critical it is to the PID control if its inputs become irregular in timing intervals.

An option would be to send it the previous value you stored in a shift register.  But then I don't know if you'll have a problem sending it a stale value in the situation where the input value is rapidly changing.

0 Kudos
Message 9 of 10

It worked again 

Thank you very much


0 Kudos
Message 10 of 10