LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with running multiple functions

Hi all,

 

I need to monitor some variables from a controller using the modbus protocol. First I tried making some little VIs to test reading some variables of the same type (for example just one block to read 4 consecutive input registers), and it worked fine. But now when I want to read more things, I have problems.

 

I attached an image of the VI I'm using (I'm new to labview, so it probably has some big mistakes). If I run it using the Highlight Execution (the lightbult troubleshooting feature), I see that the blocks are being read one at a time from the upper to the lower, and the results are the ones I'm looking for (good result.png). Unfortunately the speed is too low. And when I run it at normal speed, it goes crazy, I don't see any result at all, in fact some wrong results are written (the indicator led above the "2" in the images turns on at a random time, the OK/NG indicators are blinking, and the "Etapa Actual" [Current Step] stays at 0)

 

I don't know how to fix that, it probably has to do with adding some time loops or making the reads sequential or something like that, but I'm new to labview so I don't know what's the correct approach to solve the problem.

 

Thanks in advance,

Stefan.

 

 

Download All
0 Kudos
Message 1 of 3
(2,257 Views)

I solved the problem, I just had to wire the blocks in a sequential way (I still don't know why, but it works).

 

Feel free to delete this topic.

0 Kudos
Message 2 of 3
(2,239 Views)

@Llisas wrote:

I solved the problem, I just had to wire the blocks in a sequential way (I still don't know why, but it works).

 

Feel free to delete this topic.


I would strongly suggest at least reading this tutorial to give you an idea of why your fix worked (or maybe only appeared to work).  Myself, I never just throw up my hands and say, "Whatever," and wash my hands of the situation without trying my best to understand just what fixed it.  Guranteed you'll run into the same/similar problem and this time your fix won't work.
 
Please do yourself a favor and try to understand why it is working now, and save yourself (or more likely, the next poor dev to work on this project) some heartache.
Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 3 of 3
(2,200 Views)