Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

understand error message

hi,
 
  i am new to labview (8 days and counting), so i'm a true beginner to programming with it. could someone please decipher what this error message means: VISA Read in pumpread.vi->startbuild.vi currently, the property node is set to read the baud rate. when it was set to number of bytes at serial port the operation just timed out. i don't know if this is enough information, so please let me know if you need any clarification.
 
mgg
0 Kudos
Message 1 of 10
(4,556 Views)
You should be able to post your vi to this forum. If your vi is very large it would be better to create a vi that just shows the failing case.
0 Kudos
Message 2 of 10
(4,551 Views)
sorry about that, i think they are posted now.
Download All
0 Kudos
Message 3 of 10
(4,548 Views)
I don't think there's anything inherently wrong with the VIs you posted.  They send a command ("00 Rev\r") to the serial port and wait for a response.
 
The error cluster you get back has an error code (probably a large negative number) that should provide more information.  Right click on the border of the error cluster and select "Explain Error".  This should look up the error code and return something more helpful.
 
You can also try running NI Spy alongside your LabVIEW application, and see if it provides additional information.  (Start -> Program Files -> National Instruments -> NI Spy)
 
If you can't figure it out, post back here and let us know the error code and full explanation.
 
Good luck.
 
Brian
 
Message 4 of 10
(4,543 Views)

Hi,

The VI's looks nice but, you read the characters from the COM port right after the write and bytes at serial port'

I don't know when you stop the while loop, but is it possible when you receive a part of the reply that the loop stops ?

Can you have a look here reply 17 and here.

With my VI you should know how many bytes there will be returned this can be a disadvantage.

You can also try to wait some time (a few hundred msec?) after the write and before 'bytes at serial port' depending on your device.

0 Kudos
Message 5 of 10
(4,528 Views)
hi,

all i get is the time-out error, but when i check with hyperterminal i can connect and type in commands that work. i got a different error the first run saying that the property node substart > startmotor.vi.  any further suggestions? also, i used your COM port. vi and am not sure I am using it correctly, should I use it independently of my vi's or insert it as a sub vi.

thanks
0 Kudos
Message 6 of 10
(4,515 Views)

Hi,

The COM port in reply 17 can be used as a VI, but you have to set the COM parameters according your device and make sure you want or not want to add a <cr> to your command.

Did you try placing a wait after the write in your VI ?

The time-out error you get is that your time-out message or from a function ?

0 Kudos
Message 7 of 10
(4,509 Views)
hi,

so, i think the problem is that my VISA is set to 1(10) stop bits and needs to be set to 2 (20). I cannot change anything through the Edit VISA Resource on the drop down menu. How do I change this? Also, the time-out error is the error message from the error clusters in the vi's and should only come up when the connection to the pump failed.

mgg

0 Kudos
Message 8 of 10
(4,501 Views)
Use a VISA configure serial port function just after you resource name function. It has termianls to set baud, stop bits, etc.
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 9 of 10
(4,499 Views)
thanks for all the advice, it's working now. Smiley Happy
0 Kudos
Message 10 of 10
(4,474 Views)