Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

HP 5890 II - Keyspan Serial USB

Dear NI-Community,

 

since 4 weeks I have been trying to connect and control my HP 5890 Seris II with my Win7 machine via LabView ... unfortunately without any success.

 

I could already realize a Serial-USB connection with the software "Unichrom". So I assume that my cable should be fine. 

 

I tried to install the third party driver of the cornell server (http://ceeserver.cee.cornell.edu/mw24/Software/) and requested the full source code.

 

1) So I have the llb-file and also two dll-files. My first problem seems to be that I'm not sure how to install this cornell-driver in a correct way. I couldn't find any header-file as I was supposed to. Is there any specific procedure for that?

 

2) When I run the VISA-Test Panel for my COM3-Port (Serial-USB) I see the following problem:

Attribute --> Is Port Connected

VISA Attribute Name --> U_ATTR_ASRL_CONNECTED

Current Value --> Invalid Property Value

 

Please help me with that. I'm a new labview user and also study the labview studient version text book. But I feel that in this case I would need some additional help. I highly appreciate any helpful comment. I also attached some snapshots of errors and described problems.

 

Kind regards,

Mario

 

PS: I really carefully checked all previous topics about the HP 5890 connection and triple-checked baud rates etc. ....

0 Kudos
Message 1 of 11
(5,041 Views)

not all serial usb cables support all attributes and NI-visa is very selective!

Try to find out which attribute is invalid.

To find out open all subvi's in the initialize visa and watch with probes where the error occurs and then show the blockdiagram together with the local error message.

 

greetings from the Netherlands
0 Kudos
Message 2 of 11
(5,012 Views)

Thank you very much for your fast answer!

I believe the problem is in one subVI (write read until ts.vi). There always occures a communication error. Also I'm wondering about the fact that my COM3-Port (RS232-USB Adapter) is mentioned in NI-MAX but when I'm doing the Serial Troubleshooting I receive an error message that there is no configured serial interface ...

It's really confusing because I still don't know if it is a problem with my usb connector or not...

 

Thanks a lot for your help!

 

EDIT: I also tried another simple write and read vi but there is no read buffer at the end. Only writing seems to work.

0 Kudos
Message 3 of 11
(4,993 Views)

the message says no NI serail interfaces and that seems correct because a Keyspan is not from NI.

 

to get more info on the error please connct all error in/out connections.

Sure only out to in and to the next vi

 

greetings from the Netherlands
0 Kudos
Message 4 of 11
(4,968 Views)

I guess the first step is pin pointing where in the code the error is being generated. You mentioned you are new to LabVIEW, so I'll make couple of suggestions although they may seem obvious:

 

1- As Albert mentioned, it's a best practice to connect all the error in and out wires throughout all the subVIs (unless there is a particular reason) so that all the error data will propagate downstreams and you will be able to trace them easily.

 

2- Take advantage of LabVIEW's powerful debug tools to find where exatcly the error started by using "Retain Wire Values" along with execution highlighting or break points if necessary and probe the wires.

 

Once you pinpoint where in the code the error was generated, you can use "Retain Wire Values" to see exactly what input went into that subVI and caused the error. That will allow you to find the error's cause and isolate it. Then it will become easier to look for a fix.

Certified LabVIEW Architect (CLA)
0 Kudos
Message 5 of 11
(4,941 Views)

Hi,

thank you very much for your help and tips!

I tried to follow that and somehow I figured out which subVI is the real problem. I also could clarify that finally the RS232 cable and the usb-rs232 converter are working well.

This was possible with a simple write-read-vi (one byte at a time)  from the NI website (video: http://sendvid.com/f2yc9wyw ).

The problematic subVI should be also used for "write/read one byte at a time" (write read until ts, video: http://sendvid.com/nb39mkno). But it doens't work.

Do you have any idea ? 🙂

Thanks a lot again!

Best regards,

Mario

0 Kudos
Message 6 of 11
(4,899 Views)

Sorry the links somehow don't work anymore.

Here is the link for "write read until ts" from my driver bundle, which doesn't work.

https://www.magentacloud.de/lnk/X0GUFii1

 

Here is the link for the working write & read one byte at a time, which works withour any problems.

https://www.magentacloud.de/lnk/oBGUl59N

 

Maybe you see any source of the problem write read until ts VI ?

Best regards,

Mario

0 Kudos
Message 7 of 11
(4,878 Views)

Are all of your serial settings being set correctly in the write read until ts VI? It seems like you just go to write to the port, and then when you go to check how many bytes are at the port it says there aren't any. 

Eden K
Applications Engineer
0 Kudos
Message 8 of 11
(4,868 Views)

Also if you could add error handling to your code (connecting the error inputs/outputs of your VIs) that would help us determine if it is throwing some error or not.

Eden K
Applications Engineer
0 Kudos
Message 9 of 11
(4,865 Views)

I looked at both the videos. The difference I see is in opening the serial connection. The code that doesn't get a response from the instrument is just doing a VISA write. But I don't see the settings being set beforehand. Are you sure same settings (baud rate, start/stop bits, parity, flow control) are applied to the example that doesn't work? I assumed they should be in its caller, where the connection is established and then the VISA address is passed to the VI that you provided.

Certified LabVIEW Architect (CLA)
0 Kudos
Message 10 of 11
(4,847 Views)