LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus Labview Program

Solved!
Go to solution

Hi,

Finally I got rid of the error. As you say arteitle, there was a communication problem in the controllers. I fixed it. In the manual, there was two different combination style. I did first one but the correct one was the second so I changed it to 2 then it worked. Now both trials of VI's are working! So there was no problem in those VI's. Thanks for everything. I am appreciated. I will read links that you sent surely. For now,lastly, I have little problem. I want to show them in the same waveform chart as an extra. In the snippet, how I did is shown. erer.png

 

I tried many cases, I bundled them, convert them but all of them didn't work.

How can I overcome that problem?

Sincerely. 

0 Kudos
Message 31 of 33
(1,291 Views)

Okey, I handled with it. I solved it. I did it like;selected.png

 

Maybe you can offer me another ways or best ways to make it in that VI. Have a nice days.

0 Kudos
Message 32 of 33
(1,288 Views)

The Modbus "Read Holding Registers" function always outputs a 1-D array, even if you only ask it for a single value. When you build several of these outputs into an array, the result is actually a 2-D array, rather than the 1-D array you'd expect. It looks like transposing this array worked for you; other solutions would include concatenating these 1-D arrays of one reading each into a bigger 1-D array containing all four readings, or using "index array" to extract the single readings from the output arrays, then building those four scalars into a new array.

0 Kudos
Message 33 of 33
(1,284 Views)