From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

AVL Digas 4000 - Problem getting data

Hello everyone, i am a university student at my final year and as a project i am trying to build a block diagram for getting some datas from an engine. But i am having problems communicating with AVL Digas 4000. Now i try their software IsoTec.exe and there is no problem getting datas with it. But when i try to get some data with labview these errors occur.

In the first picture when i try to connect Return count to Byte count there is no problem with getting data however the data i get is not enough to derive something from it. You can see the situation on the second picture. And after a while working like this i gives an error you can see it in the 3rd pic. After pressing run again it starts running again and begins giving random bits of the data you can see it in the 4th pic. But it is working, so i break the connection between Visa W and Visa R and connect 144 constant to Visa R byte count it gives much more info so i can derive something from it you can see it in the 5th pic. But after 4th or 5th time it gives an error again (6th pic) and this time it wont run again until i break the connection between the constant and reconnect the Visa W and Visa R. And then i run the vi like this a few times, break the connection again, connect the constant again to get some more useful data and then the same thing happens. I am not able to get a constant data flow without an error. 

 

Can you please help me with this issue? Thank you very much in advance 🙂

 

Edit: I put the vi too 🙂

0 Kudos
Message 1 of 5
(2,922 Views)

Hi takofako,

 

I found another forum post that discusses some troubleshooting steps regarding the error you are seeing

 

https://forums.ni.com/t5/Dr-LabVIEW/Re-Why-do-I-Receive-Timeout-Error-1073807339-on-VISA-Read-or/gpm...

Applications Engineering
National Instruments
0 Kudos
Message 2 of 5
(2,885 Views)

Thank you i fixed the problem with installing the correct usb driver and adding a few more things to block diagram. Sorry for late thanking 🙂 i had mid terms.

0 Kudos
Message 3 of 5
(2,845 Views)

Not sure if you fixed this already, but you are setting the output of your VISA Write (number of characters) to the input of your VISA Read.  Unless the command you send and the data you get back will have the exact same number of characters, that's not a good idea. The character count output of VISA Write is just a double check that you are sending what you think you're sending.

 

For example, I can send my B2902 a "*IDN?" command which is 5 chars (or 7 if you append \r).  If then do a read I get "Agilent Technologies,B2902A,MY51141219,2.5.1351.6139" which is 53 characters.  Using your code with write wired to read, I would have only received "Agile".
.

Usually people just allocate a larger than expected read count like 1024 when you are expecting 100-400 chars.  It only reads back exactly what the instrument sends ending the read on the termination character, or up to 1024.  So if you are just setting up your measurement you should check the length of string you read back to see if you've hit the limit..then up the limit until you have a good buffer.  Saves some hassle down the road when you reuse the code.

 

Good luck with it!

 

 

0 Kudos
Message 4 of 5
(2,838 Views)

i have already fixed that but thank you so much 🙂 have a nice day

0 Kudos
Message 5 of 5
(2,826 Views)