Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Read Error Problem When Communicating With Agilent Device

Hello Everyone,
 
I am currently in my final year of working towards an EE degree. Our school started a new class this semester called Virtual Instruments where we are focused on learning the basics of icon based programming. Of course, LabVIEW is the system of choice. As a class project my partner and I are trying to use our laptops to control our lab equipment. We have run into a problem.
 
We are trying to communicate with Agilent's Function Generator-33120A via the RS 232 serial interface. We are running LabVIEW ver 8.0 on Windows XP and have downloaded the lastest plug and play drivers. The cable is a null-modem cable which came with the device. We have verified that the device and the software are configured properly: baud rate, parity, data bits, stop bits. We are not sure about the start bits. We cannot find where in the VI to set that.
 
We are getting a read error: #1073807339.
 
We have searched the knowledge base and forums looking for a solution and appear to have come up empty. That's where we learned about stop bits. Among the suggestions we tried was enlarging the timeout buffer (we expanded it to as large as one minute) and having the proper termination characters set, which for the device is /r /n, or 13 10 (this was tried with the ASRL input set to term char and none).
 
We are at a loss and woud appreciate any advice, input, or help. Hopefully it is something simple that we have overlooked. I have included pics of the part of the VI where we think the problem is and the NI-Spy, and the latest version of our VI.
 
Thanks
 
 
 
 
 

Message Edited by Waldokhan on 04-13-2007 02:41 PM

Message Edited by Waldokhan on 04-13-2007 02:46 PM

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

First, your attachments are not there. If you clicked the preview button, that loses them and you have to reattach. Second, have you tried using something like Hyperterminal to talk to it?

Nevermind about the attachments. They are there now. But you should try Hyperterminal.

Also, if you set the term character to none, no character will be transmitted at the end of each command and it will not work at all. I don't think you should have modified it at all. The original LF character should have been enough.

Message Edited by Dennis Knutson on 04-13-2007 01:51 PM

Message Edited by Dennis Knutson on 04-13-2007 01:56 PM

0 Kudos
Message 2 of 7
(4,597 Views)
Yep, preview button...
 
No, we have not tried hyperterminal. We'll give it a shot at our next session.
 
We'll also go back to termchar and original LF.
 
Thanks

Message Edited by Waldokhan on 04-13-2007 03:00 PM

Message Edited by Waldokhan on 04-13-2007 03:03 PM

0 Kudos
Message 3 of 7
(4,586 Views)
I've got a 33250A which uses the same driver that I can try if you have success with Hyperterminal but the LabVIEW driver still fails. I've only used the instrument with a GPIB interface and that works with no problems.
0 Kudos
Message 4 of 7
(4,578 Views)
Excuse my confusion (it's the end of the semester), but, do you mean to use hyperterminal instead of LabVIEW, or LabVIEW with hyperterminal?
 
At first I was assuming LabVIEW through hyperterminal, but then I got to thinking that you might mean testing communication through hyperterminal after seeing your last post.
0 Kudos
Message 5 of 7
(4,572 Views)
Test it with Hyperterminal alone. You can't use both of them at the same time. Just something simple like sending the *IDN? query should be enough. If you get something back, then you've verified that the cable and com port settings are correct.
0 Kudos
Message 6 of 7
(4,570 Views)
Okay, thanks for the clarification!
 
We're meeting up tomorrow evening. Please wish us luck. We have to give a demonstration Monday morning. Smiley Surprised
0 Kudos
Message 7 of 7
(4,566 Views)