12-17-2010 01:21 PM
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!
12-17-2010 01:30 PM
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.
12-17-2010 02:40 PM
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.
12-20-2010 08:17 AM
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.
12-20-2010 09:56 AM
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...
12-21-2010 08:46 AM
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 ?
12-21-2010 02:34 PM
Double-check your Index, Value and Request Type values.
Shane
03-04-2011 12:00 PM
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
03-04-2011 12:13 PM
Why are you using RAW instead of the RS-232 driver for the FTDI chip?
03-04-2011 12:33 PM
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