LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Possible bug?

Hi all,

Another serial port related question from me.

I have an analytic scale which measures the weight of my sample. I'm using Labview 6.1 to collect the weight and use this value to do some calculations.

The VI attached works. But it seems that once in a while the program would get stuck on read and instead of giving a meaningful value for weight it would give '0.' This 0 value then screws up my calculations.

I've tried running the program continuously for like 30 mins and no error occurred. Then I tried running it again 2 errors would occur within the first 5 minutes. I'm puzzled about this bug. I've tried pausing the program when the error occurs in hoping to read the error code but I've always paused it at the wrong time (when it stucks on read), when I resumed and tried pausing again it would already be taking another reading.

Thanx for the helps.
0 Kudos
Message 1 of 4
(2,766 Views)

Hi,

I think it's NOT a BUG. You have to connect the property node "bytes at port" (case 2) to the VISA Read. I send picture of fixed block diagram (Because I'm using LV 7.1....)

Why ??

Because when your VI excued, the "VISA Read" is exude with the while loop at "the same time", and the while loop must be running before to get the exact bytes at port...

Hope it will help U...

Bush-Man
0 Kudos
Message 2 of 4
(2,754 Views)
I don't see how this vi could work continuously.  In frame 2 or your sequence, you close the Visa session.  The first time your loop executes, everything will be fine.  But since the Visa session gets closed, how can you read the serial port on the second loop iteration?  I would move the close Visa to after the loop.
- tbob

Inventor of the WORM Global
0 Kudos
Message 3 of 4
(2,718 Views)
Thanx! Got it fixed! 🙂
0 Kudos
Message 4 of 4
(2,698 Views)