09-03-2015 03:50 PM
Issue:
I'm trying to connect to a Sensirion SFM3000 Gas Flow Meter using their USB Stick (made by Code Mercenaries?). The SFM3000 is an I2C device.
Progress:
I can read from the device using the Sensirion software. I've created a NI-VISA driver successfully. I can even open and close connections to it without getting an error. However, I'm getting completely lost with trying to set up the Control Pipe command, even after reading the various posts about it (including the USB nugget 2 series). The simple version is that I need to send a 0x1000 (4096 decimal) command to the device and then continuously read the data from it until I need to close the connection. I'm just getting bogged down behind items and terminology.
I can get/confirm the VISA address using the GetVISAAddresses VI. I'm trying to use it in the SensirionTry01/02 files, but I think (know) I'm using the wrong read/write VIs for Control Pipe.
Can anybody walk me through what the core of the VI should look like (assuming I have the edges correct)?
Solved! Go to Solution.
09-03-2015 04:10 PM
@wlydick wrote:
Issue:
I'm trying to connect to a Sensirion SFM3000 Gas Flow Meter using their USB Stick (made by Code Mercenaries?). The SFM3000 is an I2C device.
Progress:
I can read from the device using the Sensirion software. I've created a NI-VISA driver successfully. I can even open and close connections to it without getting an error. However, I'm getting completely lost with trying to set up the Control Pipe command, even after reading the various posts about it (including the USB nugget 2 series). The simple version is that I need to send a 0x1000 (4096 decimal) command to the device and then continuously read the data from it until I need to close the connection. I'm just getting bogged down behind items and terminology.
I can get/confirm the VISA address using the GetVISAAddresses VI. I'm trying to use it in the SensirionTry01/02 files, but I think (know) I'm using the wrong read/write VIs for Control Pipe.
Can anybody walk me through what the core of the VI should look like (assuming I have the edges correct)?
What in any of their documentation makes you even think that you can even use NI-VISA with this hardware?
09-04-2015 02:58 PM
@nyc_(is_out_of_here) wrote:
What in any of their documentation makes you even think that you can even use NI-VISA with this hardware?
Given that their documentation with regard to the Sensirion USB Stick in nearly nonexistent, it seems reasonable that creating a new driver using NI-VISA to talk to the USB end of the connection would be a good first step. Given that LabView was originally developed to talk to any equipment, it seems reasonable that it can talk to this device.
Since your response was less than useless, please elaborate on why you feel that it cannot be done this way. Include references. In addition, for extra credit, please provide a reasonable alternative solution if NI-VISA is truly not the correct option. I've been away from daily LabView coding for 10 years and it's an uphill climb.
And, as a reminder, my question was more about how to set up the USB Control Pipe VIs in LabView. It may be entirely possible that the SFM3000 via the Sensirion Stick cannot talk to LabView. If that is the case, it will be the first device I've ever seen in 25 years that wasn't able to communicate with LabView but could talk to the host PC.
09-04-2015 03:11 PM - edited 09-04-2015 03:12 PM
@wlydick wrote:
@nyc_(is_out_of_here) wrote:
What in any of their documentation makes you even think that you can even use NI-VISA with this hardware?
Given that their documentation with regard to the Sensirion USB Stick in nearly nonexistent, it seems reasonable that creating a new driver using NI-VISA to talk to the USB end of the connection would be a good first step. Given that LabView was originally developed to talk to any equipment, it seems reasonable that it can talk to this device.
Since your response was less than useless, please elaborate on why you feel that it cannot be done this way. Include references. In addition, for extra credit, please provide a reasonable alternative solution if NI-VISA is truly not the correct option. I've been away from daily LabView coding for 10 years and it's an uphill climb.
And, as a reminder, my question was more about how to set up the USB Control Pipe VIs in LabView. It may be entirely possible that the SFM3000 via the Sensirion Stick cannot talk to LabView. If that is the case, it will be the first device I've ever seen in 25 years that wasn't able to communicate with LabView but could talk to the host PC.
Hey, it is your time; not mine.
Good luck.
09-04-2015 03:15 PM
09-04-2015 04:10 PM
Dennis,
I think this is what you're asking about...
I've seen examples online where people have used the EK-F3 cable to communicate with other Sensirion sensors, but I'm not able to get to the result needed because this is not my area of specialty and I don't know where the first step is. If I'm on the wrong path, I'm hoping that someone here can recommend a better one. At this point, I've invested enough time circling this issue that it would probably be worth it to have the customer buy a USB8451 USB-I2C unit from NI and be done with it.
09-04-2015 06:32 PM
09-14-2015 11:48 AM
The customer's 8451 will be arriving today and I should have it in my hands on Wednesday. I've gotten confirmation from Sensirion that the cable is a no-go. Their response (edited for space) is below. Thank you to everyone who put up with my frustration on this.
SENSIRION RESPONSE:
Please note that the i2C interface is not compatible to communicate with Labview, therefore we do not warranty and recommend this because it will not be supported.
I suggested a cable that will convert i2C to RS485 to xxx, and through this you can configure with Labview. Although, I have not heard from a customer that they have been successful with this process. We only use this for our liquid flow meters, which has a completely different chip than the SFM3000 flow meter, therefore it will take a lot of modifications along programming to make it work.
Another way to go, would be to use the USB to I2C/SPI/SMBus Interface from National Instruments. You can find this product using the following link:
http://sine.ni.com/nips/cds/view/p/lang/en/nid/202368
Unfortunately it is quite expensive but probably the least effort in terms of drivers and support from National Instruments.
Another option to consider is the Arduino based solutions, for example this "Adafruit FT232H Breakout - General Purpose USB to GPIO+SPI+I2C" which you can find here:
http://www.adafruit.com/product/2264
It only costs a fraction but will be more work to get it running.
One important thing to keep in mind is that I2C is not intended to operate over long distances. It is known to cause problems if the cables are too long. We therefore recommend to keep the I2C cables as short as possible (<30cm).
Once your sensor is connected to the PC via the NI card they can communicate with the sensor using I2C and the APIs which Labview supplies. A basic tutorial can be found here:
http://www.ni.com/tutorial/5767/en/
and a Labview Waveform Library here:
http://www.ni.com/example/31080/en/
Lastly, of course our main recommendation is to use the original communication protocol and that’s the i2C digital interface.
09-14-2015 09:05 PM
Low cost
Low Price
Which is it? a cheep-A$$ dongle, that exposes some poor interface, or, an instrument Plug-n-Pray device?,
09-18-2015 10:04 AM - edited 09-18-2015 10:06 AM
Because I've seen several threads over the course of my search, here is a LLB for my Sensirion SFM-3000 solution. It uses a NI USB-8451 to communicate with the SFM-3000 rather than the Sensirion EK-F3x cable. I stole copied from the 8451 examples and worked from there.
I have the data running to a Global so that the routine can simply loop but still provide the data to outside VIs. There's probably a better way to do it, but this works for what I'm doing (so far).
Again, my thanks to everyone who helped me out with this.
EDIT - enlarged the pics, doesn't seem to have helped much ...