11-30-2016 04:34 PM
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. ....
12-01-2016 03:06 AM
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.
12-02-2016 12:54 PM - edited 12-02-2016 01:14 PM
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.
12-03-2016 09:24 AM
12-04-2016 08:45 PM - edited 12-04-2016 08:47 PM
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.
12-12-2016 02:21 PM
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
12-13-2016 10:25 AM
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
12-13-2016 05:08 PM
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.
12-13-2016 05:10 PM
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.
12-14-2016 01:19 AM
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.