LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

agilent 34970A serial communication

I'm trying to communicate with the agilent 34970A using a serial connection.  I set up the connection in MAX and verified communication by sending a few commands and queries.  No problem there.  When I switch to LabVIEW 8.5, I use the EZ Temperature.vi, but I get an error on the Read portion of the process.  If I attach a terminator (\n) to the end of the command string generated in the EZ Temperature.vi, I get a write error.  If I connect to the GPIB bus, there is no problem.  I've read many posts about this but most are a few years old.  Can anyone give me a tip on this one?  Thanks.
0 Kudos
Message 1 of 5
(4,173 Views)
Sounds like a driver issue.  To be clear the same everything (serial cable, equipment, and PC) works in previous version of LabVIEW.  Correct?
Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 2 of 5
(4,166 Views)
Also, not all serial cabels are created equal.  Try a different serial cable if you have one available.
Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 3 of 5
(4,165 Views)

Matt,

Thanks for the reply.  I'm adding this feature to an existing LabVIEW 8.5 application, so it was not part of any previous version of the software.  I am on my second serial cable, and the communication is good with MAX.  That's the sticking point for me.  The EZ Temperature.vi is simply a visa write and a visa read.  It's my understanding that the VIWrite and VIRead in the MAX test panel are accomplished using the same vi's.  In the past, I've been able to introduce a time delay between the write and the read, but in this case, the time is critical and I don't have much to play with. 

 

0 Kudos
Message 4 of 5
(4,162 Views)

Serial can get inconsistent when you don’t give enough time between reads and writes.  The first thing I would do is give it a long delay between reads and writes to see if it behaves correctly.  Then reduce the time until it starts acting up.  Add a bit of extra from the point where you start to see problems.  This is the empirical method of figuring out the best timing.   Let me know if a longer delay fixes the issue.  Also, if you are moving lots of data you may have some buffering issues.

Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 5 of 5
(4,156 Views)