LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

HP4194 and GPIB corrupt data

Running a HP4194 impedance analyser via the GPIB card using Labview 5.1. The first bit of data from the analyser is complete rubbish, then follow on data is OK. IF I run the routine once, dont' store the data, then run again the data sent to my file is ok. This is not satisfactory. Does anyone have any clues why the first bit of data is rubbish?
0 Kudos
Message 1 of 7
(4,047 Views)
A little more information please... The first time the communications doesn't work but the second time it does. Does it work consistently after that? If not, when does it stop working? Could you email me a file with the exact responses from the instrument after attempting this transaction 5 or 6 times in a row?

Mike...
mporter@arielcorp.com

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 7
(4,047 Views)
A little more information please... The first time the communications doesn't work but the second time it does. Does it work consistently after that? If not, when does it stop working? Could you email me a file with the exact responses from the instrument after attempting this transaction 5 or 6 times in a row?

Mike...
mporter@arielcorp.com

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 7
(4,048 Views)
Denis,
As an experiment, you may try by putting the GPIB function in order

GPIB clear (this will clear the bus to make a healthy communication later)
GPIB write (write the command you would like to query data)
GPIB trigger
GPIB read

Let me know if it works,

Thanks,
Nam.


Denis Hodgins wrote in message
news:506500000008000000B63D0000-1012609683000@exchange.ni.com...
> Running a HP4194 impedance analyser via the GPIB card using Labview
> 5.1. The first bit of data from the analyser is complete rubbish,
> then follow on data is OK. IF I run the routine once, dont' store the
> data, then run again the data sent to my file is ok. This is not
> satisfactory. Does anyone have any clues why the first bit of data is
> rubbish?
0 Kudos
Message 4 of 7
(4,049 Views)
It sounds like you are reading "old" data that is in one of the registers. It is best to reset(RST) the instrument before a test routine. It is possible that you are trying to read data from the register before it is there. You must let a sweep complete before trying to get the A or B register data. Otherwise, you will be getting values from a previous test, or zeros if the instrument has been reset. A loop can be set up that checks for the status byte value that corresponds to a sweep complete or a measurement complete. At this point you could then get your register data.

Also, regarding your compensation routine question. Even though you are able to compensate through GPIB, you must tell the 4194 that you want to use that compensation information. Th
is is done with OPN1 and SHT1. These should be sent after your compensation, but before the the test routine.
0 Kudos
Message 5 of 7
(4,047 Views)
Hi,
         i am developing a USB-GPIB Converter application(I am  using CY7C68014a on USB side and TNT4882 on GPIB side).I am Using both NI PCI GPIB card and NI USB HS Card.while usinng PCI GPIB card My application gets Lots of Corrupted data (Basiaclly missing some data),Particularly For *IDN? i am getting correct response only after trying 2 or 3 times.  but my application works  fine with USB HS. Does this data corruption has any thing to do with the Operating speed of the Two cards? please help me to sort it out

TIA

with Regards
R.Sreedhar
0 Kudos
Message 6 of 7
(3,856 Views)
Hello srid,

In general I would recommend creating a new thread when you want to post a new question, as more people are likely to see it that way.  You can always include a hyperlink to the old thread if you think it may be related.

As far as the issue you are dealing with, what type of data corruption are you seeing?  Are you missing characters in the beginning, middle, or end of the string?  Please post some examples of the expected response and what you actually see.

You could also try replacing your GPIB cable to rule it out as a source of problems, although I would not consider it to be a likely cause.

Let us know some more detail, and we will be happy to help out.

Jason Smith
Applications Engineer
National Instruments
0 Kudos
Message 7 of 7
(3,843 Views)