LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

USB RAW data acquisition

I have a Mettler M300 meter from wich I'd like to gather data. It is recognized as a USB HID when connected, so I had to make a PNF file with Driver Wizard. Now I can see it in MAX (name= USB0::0x1730::0xC300::NI-VISA-0::RAW). 

 

When I go in test panel, I obtain those details from it :

VI_ATTR_TMO_VALUE = 2000
VI_ATTR_MAX_QUEUE_LENGTH = 50
VI_ATTR_TERMCHAR = 0x0A
VI_ATTR_TERMCHAR_EN = VI_FALSE
VI_ATTR_IO_PROT = 1
VI_ATTR_SUPPRESS_END_EN = VI_FALSE
VI_ATTR_USB_MAX_INTR_SIZE = 64
VI_ATTR_USB_CTRL_PIPE = 0x0000
VI_ATTR_USB_BULK_OUT_PIPE = 0xFFFF
VI_ATTR_USB_BULK_IN_PIPE = 0xFFFF
VI_ATTR_USB_INTR_IN_PIPE = 0x0081
VI_ATTR_USB_ALT_SETTING = 0
VI_ATTR_USB_BULK_OUT_STATUS = -1
VI_ATTR_USB_BULK_IN_STATUS = -1
VI_ATTR_USB_END_IN = 5

 

The -1 to the Bulk pipe seems to mean that there's no possibility to use it.

I know by the company which string I have to send to the meter " [0x02][0x01]D " and what it is supposed to answer me (57 caracters long) but I just don't know where to input that!

0 Kudos
Message 1 of 21
(4,886 Views)

Use a VISA Write to send string commands to your device.

 

\02\01D

 

Then use a VISA Read to read in the 57 bytes.

 

Use USB0::0x1730::0xC300::NI-VISA-0::RAW as your VISA ref to your device.

Omar
0 Kudos
Message 2 of 21
(4,880 Views)

Being a HID, it doesn't HAVE a bulk pipe.

 

HIDs have control and Interrupt pipes only, that'y part of what makes them HIDs.

 

Shane.

0 Kudos
Message 3 of 21
(4,865 Views)

When I try to use VISA write, I always obtain :

 

Error -1073807302 occurred at VISA Write in Untitled 1
Possible reason(s):
VISA:  (Hex 0xBFFF003A) Unable to start operation because setup is invalid (due to attributes being set to an inconsistent state).

 

The VISA open and VISA close are OK.

0 Kudos
Message 4 of 21
(4,820 Views)

I just found, from Intaris Nugget's that I should use Visa Control In and Control Out, since there's no bulk pipe on my device.

 

I'll give it a try...

0 Kudos
Message 5 of 21
(4,808 Views)

There's what I have tried to get my data:

Now I don't have any error message, but everything I got is always #0 at the read buffer endpoint. I've tried many different settings and it's always the same. Do anybody have an idea ?

 

usb.JPG

 

0 Kudos
Message 6 of 21
(4,780 Views)

Double-check your Index, Value and Request Type values.

 

Shane

0 Kudos
Message 7 of 21
(4,764 Views)

Hello,

 

Have you find a solution , because I am facing the same situation. I am using a USB RAW  based on FTD232C chip and I can't communicat with it.With Max I can find the Visa Resourec But any caractere send to the device do the same effect send back 0X01 0X60 without sense for the device . For exemple you Send "?" you receive S>0000

 Thanks for your help

0 Kudos
Message 8 of 21
(4,529 Views)

Why are you using RAW instead of the RS-232 driver for the FTDI chip?

0 Kudos
Message 9 of 21
(4,510 Views)

 

Hello,

 

I don't have the  choise because I don't manage the Hardware . The external board is build with USB connection and I have to connect it on Touch screen with WinCE5.

 

On Touch screen the only way to Find The Visa Resource is to use the RAW driver. Thanks for your help

 

Regards 

0 Kudos
Message 10 of 21
(4,506 Views)