Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Testing connectivity of visa device

I'm having some troubles connecting with a convectron gauge through labview. It communicates with RS485 and I have it connected to the computer through USB. When I write any type of command to it I continue to get a VISA time out error. I have already tried setting VISA timeout through the VISA property node and I still have no response.

 

A clue I discovered was that when I disconnect the convectron gauge from the USB converter I still get the same error. I'm thinking this may be a hardware issue. Maybe my gauge is not wired properly? I just dont understand how this could be the problem (unless I'm using bad wires) because I only have to wire RS485 +/- to it's respective ports in the USB converter.

 

Is there any easy way of telling if my convectron gauge is connected to the converter? I get COM4 working properly in MAX but I'm sure it is only reckognizing the USB converter.

 

Any suggestions would be appreciated.

 

-chris

0 Kudos
Message 1 of 7
(4,304 Views)

Chris,

 

There could be a number of things going wrong.  Several questions:

 

1. From your post, it looks like you have already configured the USB converter to appear as a COM port in Measurement and Automation Explorer?  Is this correct?

 

2. Could you post the manual of the gauge so that I can take a look at the command set?  What is the actual model number of the gauge you are using?

 

3. If you have another USB-485 converter, it would be useful to perform a loopback test to see if the commands are actually being sent.

 

Regards,

Ben

National Instruments
Certified LabVIEW Associate Developer
Certified TestStand Developer
0 Kudos
Message 2 of 7
(4,278 Views)

Most often the serial cable is wrong ( NULL modem or 1:1 connection)

Or your instrument is in a handshaking mode that is not activated correctly.

 

Yesterday I spent half a day because the instrument was not allowed to send something in the mode it was in.

 

greetings from the Netherlands
0 Kudos
Message 3 of 7
(4,266 Views)

The manual for the Series 275 miniconvectron gauge R485 (granville-phillips) is posted. I also have my VI posted - I know it's not complete but could you confirm that I should be getting a response from the gauge?

 

Yes I know that it is set up through COM4 through my Windows Device Manager. Also, I have set the baud rate to 19.2kbps per the manual.

Download All
0 Kudos
Message 4 of 7
(4,249 Views)

Burban,

 

Please check out my post below. I have the manual and my VI posted. Also, could you guys explain what handshaking is in layman's terms?

0 Kudos
Message 5 of 7
(4,248 Views)

Hi

 

I looked at your diagram and I don't understand why you need a while loop.

testing this can be done without the while and a start of a statemachine.

 

just initialize the serial line in init serial (where do you set it to 19200 baud? Probably in MAX but did you test this with a scope?

 

And what is this string meaning : #01RD CR

The #01RD may be a command but CR definitely is not a carriage return.

put the string display in /mode (right click on the constant string) and make it look (in /mode) #01RD /r

and try again

greetings from the Netherlands
Message 6 of 7
(4,237 Views)

OK I get it.

 

Your vi will wait indefinatly for the operator to press the boolean and then go into a loop to read the input as fast as possible until the operator changes the boolean.

 

Swap the mechanical action of the boolean to "latch when pressed" (it will be false until it is pressed true til its read and go back to false and you will get 1 reading every time the swithch is pressed.

 

Get rid of the local!!!! there is no data dependancy and you cannot know when the local is written compared to when the control is read.

 

Give yourself a STOP control so the vi can exit without hitting <ctrl_.> or the stop icon in the menu.

 

 Resize and clean it up so others can look at the code.   ( I have a small monitor- and it is good practice)

 

Your doing fine for a beginner! 

0 Kudos
Message 7 of 7
(4,226 Views)