Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

visa read timeout

Hello all,

 

I'm trying my hand at creating a control vi for a SHIMPO DT-209X tachometer. The lastest software driver works for Windows XP and I am trying to control it with a modern OS.

 

I went through the USB Instrument Control Tutorial (http://www.ni.com/white-paper/4478/en/) and NI-MAX is recognizing the device. When I open the VISA Test Panel and got to Input/Output, I can write to the device and get a return count. When I try to read or query, however, I get a Hex 0xBFFF0015 errorthat says the timeout expired before the opration was completed.

 

I tried a simple VI that had a VISA OPEN, VISA WRITE, VISA READ but I get the same error in VISA READ as well as a 1073807339 error code. When I try to run the vi two more times, I begin to get an error in VISA WRITE.

I tried the corresponding help page (http://digital.ni.com/public.nsf/allkb/874B379E24C0A0D686256FCF007A6EA0) for the error code but none of the suggestions have been able to solve the problem. I tried a bunch of other fixes including a propety node that could tell me more about the device connection but have not found anything helpful.

I'm currently out of ideas and could really use some help on what the problem could be. I am attaching my .vi and a screenshot of all the parameters I've gotten out of the property node.


Would really appreciate any advice you can provide.

 

Thanks,

Yusif

Download All
0 Kudos
Message 1 of 18
(4,722 Views)
If you got a driver from the vendor, why would you discard it and try to write your own with the VISA wizard? You could have used the Call Library Function Node. I don't see the information required for VISA control but I didn't read the whole pdf. Where did you get the USB raw information that you need?
0 Kudos
Message 2 of 18
(4,713 Views)

Dennis,


Thank you for your response. The problem with the driver is that it only works for XP or lower. My computer, running Windows 7, neither sees nor accepts the driver that is available. Furthermore, the company's website says that they have stopped making supported software for current OS's. Could you please elaborate on the Call Library Function Node and how it would apply given the situation. I will read up on it tomorrow.

 

Since the driver/software was not working I used the VISA wizard. Now NI-MAX sees the instrument, can write to it and I only get an error on the read step. This seemed like progress compared to where I was with the driver and corresponded to the first white paper I linked to. Also what USB RAW information are you referring to?

 

Thank you for your help,

Yusif

0 Kudos
Message 3 of 18
(4,711 Views)
If the dll does not run on windows 7, then you can't use the clfn to call it.

Not getting an error on the write is meaningless. It does not mean you are writing the correct data in the correct way. The USB RAW is the low level protocol. It is what the dll is using. Perhaps you can get the source code? Using an instrument that is not supported by the vendor makes your task very difficult.
0 Kudos
Message 4 of 18
(4,705 Views)

Dennis,

 

The difficulty is the allure in this case. I just finished university and am waiting for my job to begin. Using this time to stay sharp and I thought this tachometer would be a good project to work on.

 

Regarding the source code, I do have a command list from the company if that is what you mean. It has two sets commands for the same function. For example to ask for the device identification you can write data[] or 0x00. Come to think of it, I've only been doing the data commands so far and have not tried in hex format. Is that what you meant or is there another way to approach this?

 

Also, I've been looking at an old thread you've contributed on ( http://forums.ni.com/t5/LabVIEW/Error-with-Visa-and-USB-device/td-p/1242864 ). Unofrtunately the user has not been active for 3 years but that thread seems to have been resolved. Did he just end up running the XP software or am I missing the fix?

 

Thanks again for your help,

Yusif

0 Kudos
Message 5 of 18
(4,688 Views)

Hi

 

It seems I got the similar problem with you, I can write but cannot read (timeout). In my case, some engineers in this forum told me dll file is not needed.

 

I was thinking whether I missed some setup for VISA or I sent the wrong command, but no progress now.

 

ConfusedSmiley Sad

0 Kudos
Message 6 of 18
(4,656 Views)

Jenny,

 

Thanks for the reply, always good to have someone to collaborate with. I tried the Hex setting on the String In, didn't change anything off the bat but I will explore it more later.

 

Right now I found this USB traffic snooper ( http://blogs.msdn.com/b/usbcoreblog/archive/2009/12/04/etw-in-the-windows-7-usb-core-stack.aspx ) so I will try to see what is going on on the USB level timing and size wise. Take a look at the post and take note there is another that explains what you're looking for. Starting to think that we might need to use something lower level.

 

Thoughts? Let's work together on this.

 

Yusif

0 Kudos
Message 7 of 18
(4,637 Views)

It occurs to me that the commands I've been feeding the device were dependant on the XP driver, more specifically the .dll, and would make no sense to a driver created for VISA.

 

This is a pretty big error and I will attempt to give the Hex commands another look.

 

Yusif

0 Kudos
Message 8 of 18
(4,625 Views)
That is exactly what I said earlier.
0 Kudos
Message 9 of 18
(4,620 Views)

Dennis,

 

My apologies, it took a while for your message to sink in.

 

The command list I have from the company breaks down into ASCII and Hex commands. The former relate to the .dll which is useless in a modern OS, the latter seem like they are more in line what you were talking about but I am still getting that timeout read error.

 

My current ideas are

a. Find a program to watch the USB port traffic to see what the instrument is sending back so I can adjust accordingly to recieve.

b. Find a program to let me view the old .dll program so I can get the read parameters that way.

 

With both, the danger/fear is that either the Hex commands are still not low level enough or the parameters are right and something else is wrong but evades me.

 

Since you called it way before I figured it out, perhaps you can weigh in?

 

Thanks again,

Yusif Nurizade

0 Kudos
Message 10 of 18
(4,610 Views)