05-23-2008 11:07 AM - edited 05-23-2008 11:11 AM
05-23-2008 04:28 PM
05-23-2008 04:46 PM
You mean you want to test the Instrument I/O Assistant? The instrument driver wizard is something completely different and is available from Tools>Instrumentation in 8.5.
I don't understand why the assistant is not returning the token though. Do you have automatic error handling turned on or off? If it's off, turn it on or connect an error cluster to the assistant's error out to see if there is an error being generated. The other thing to try is to convert the assistant to a VI by right clicking on it and select Open Front Panel. You can step into it and use the debug tools (i.e. probe) to see what might be wrong.
05-27-2008 09:39 AM
I thought the I/O Assistant and the Wizard were one in the same based on the video tutorial, but I see that they are not. I looked for and found the VISA Driver Wizard from the Windows Start button. However, it doesn't have Serial, only PXI/PCI, USB, and FireWire. Do you know why?
Anyway, back to my Instr_Read I/O Assistant example. I didn't turn the automatic error handling on or off. I assume it defaults to ON. After I posted my question, I did try wiring the Error Out to an indicator, and it shows no error. However, this morning, I experimented some more. If I select another COM port to which my instrument is not connected, it returns error code 0xBFFF0015. This is a timeout error, which makes sense. When I switch back to the proper COM port, the error goes away, but still I am not getting the token output.
I decided to debug further and converted the I/O Assistant to a vi. Internally it's working (I probe various points). The problem seemed to lie in the Match Pattern vi. Its input is correct, but no output. I changed the Pattern Match string which was [,;\r\n\t]+ and got it to work. Then I closed the vi without saving, and re-opened my example. I double-clicked the I/O Assistant and changed the Character Count to be "To End of Data" and it now works. Previously, it was a specific number (10) before based on the string returned in the Assistant, but I guess it doesn't account for the 2 termination characters, so the real string length is 12 (but it only let me make it 11 giving me an "overlap" error message). Then I can see the token, but I had to expand the indicator box vertically because of a leading \n (LF).
I guess the lesson is that with any "wizard" or "assistant" there are still configuration and/or useage problems which can be more time-consuming than doing it from scratch yourself.
Thanks Dennis very much for your reply. Till next time...
05-27-2008 10:00 AM
Glad you got it to work. I've never used the Instrument I/O Assistant for any real work and I'm not surprised that there are slight modifications you might have to make.
The VISA Driver Wizard is a completely different animal than the instrument driver project tool. The VISA Driver wizard allows you to create windows inf files so that USB devices and PCI cards can be recognized as VISA devices in windows. The instrument driver wizard should be under the tools menu. What version of LabVIEW do you have?
05-27-2008 10:25 AM
I have version 8.5. I do see it in the Tools menu under "Instrumentation > Create Instrument Driver Project". I was expecting to see it in the Getting Started window, which was how I initially picked "VI from Template" (similar to the "File > New..." menu item).
After creating the Instrument Driver Project, it opens up the Help item "Instrument Driver Modification Instructions". Searching the Help more, I found:
An instrument driver is a set of high-level functions that control and communicate with instrument hardware in a system. In LabVIEW, an instrument driver is a set of VIs that communicate with an instrument using LabVIEW built-in VISA I/O functions...
So I need to read up a little more on just what NI calls a "driver". I assumed it is as stated above -- just vi's to communicate with an instrument. Your definition seems to be more along the lines of Windows (or any OS) hardware driver files (*.sys in Windows). Thanks for pointing this out to me! This is how one learns!
05-27-2008 11:35 AM
05-27-2008 01:16 PM
Thanks for the clarification and elaboration!