Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

communication with VISA RAW

Hello all,
I am a Chemical Enggr and new to LABVIEW.
I am using an USB based Data Acquisition card. (Cpress EZ-USB FX2LP). I do not have required DLL file for this device. I have installed the driver, develpoed from VISA DDW, and installed the device. Now, the device is shown as a RAW device in MAX. I have checked all the attributes (All the settable attributes are given in the file). The device is also displayed in I/O controls>> Visa Resource name drop down list.And I checked the example program given at the web tp://zone.ni.com/devzone/cda/epd/p/id/3637 it works quite well and displays control in Buffer as 2, without any error. But when I open the Instrument I/O function (As input from Block diagrom) my device is not shown in the list (only COM and LPT are shown). How to proede now on ?
Infact, data from my process is converted with 12 bit ADC in the DAQ board. DAQ card supports 16
Input and 5 Output channels. Now how can I read all the channels from my process that can be sent to
LABVIEW.
some one please help me out.
Thank You
Upen
0 Kudos
Message 1 of 5
(4,452 Views)
Upen,

When you say "Instrument I/O Function" do you mean the Instrument I/O Assistant or a specific function?  If you are using the I/O Assistant, try just using VISA functions and see if your device is in that dropdown box.  In the example, are you getting the data you expect and what data are you expecting in the buffer? 

Thanks!

Meghan
Applications Engineer

Message 2 of 5
(4,426 Views)
Hello,
Meghan, Thank you for the response.
Yes, I meant I/O Assistant, in the I/O Assistant I can not see my DAQ device. Ofcourse! when I use VISA functions I see my device in the drop down list.
In the example "USBRawControl" when I read the Control In Buffer it reads a value '2'.
And when I use Control Out Buffer, it gives an error::: Error-1073807299 occured at VISAUSB ControlOut. (VISA, HEX 0XBFFF003D Invalid buffer mask specified).
Infact, I don't know how this buffer should be. Sice I am using the 12 bit ADC card (4096 counts), I pressume, it has to give a value according to the process state.
My intension is to read data from the card continuously and send it to some text file, then I can process the data for modeling (or) I can use sysID toolkit further.
I need to know the details of channels selection and assigning different channels data to specific variables and to obtain the data from the card. I am not getting any information how to procede hereon. please suggest me some resource material where I can find, and use my card to read data continuously from the process.
[My USB card vendors provided their own developed drivers and VB program to read all channel data (0 -4096 counts) and to write data to system. Since, I am not good at VB programming I am not be able to develop other programs to develop controllers hence, I would like to work in the LabVIEW environment].
Any help please.
 
Thank you very much.

Upen
0 Kudos
Message 3 of 5
(4,413 Views)
Have you used "Flush buffer" function? In the page http://digital.ni.com/public.nsf/allkb/ad03f1520934d67f86256d4b001dc2ce you can read that your error is referred to the operation of buffer flushing. Try to use functions of VISA Palette instead of I/O Assistant.
0 Kudos
Message 4 of 5
(4,385 Views)
Hello Upen,

As MagicBotolo said, try using the VISA functions instead of the I/O Assistant.  VISA RAW is using the low level communication mechanisms of the USB specification, while the I/O Assitant is high level programming.  This knowledgebase also has some helpful information and helpful links as well.  Here is a good tutorial on USB Instrument Control and another on using LabVIEW with Instrument Control can be found here.

Good Luck with your application,

Meghan
Applications Engineer
Message 5 of 5
(4,365 Views)