LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview Drivers for Wireless Sensor Networks

Hi Anil,

Are you still having a problem? Have you been able to get the motes working with Crossbow's MoteView software? Also, for what update rate do you have them configured? You should not be getting an unexpected terminal error, though I've seen this happen if you use the halt button in LabVIEW. Instead, it is preferred for you to wait for the VI to timeout. If you do get a terminal error, it may require that you restart LabVIEW. A common error, however, is the timeout. This will happen if your mote's update rate is greater than that of the timeout. After you start the acquistion (Start Stream), the driver basically waits for packets to arrive. If you try to read before they do, then you can get a timeout. Furthermore, the example you are using waits for 100 packets. If I recall correctly, the default firmware for the MTS 300 has an update rate of around 10 seconds. This means that you need to wait about 1000 seconds before the read would complete without error. I have attached a more basic example that reads just one packet from each node on the network. It also waits 35 seconds by default. Please start from here and let me know what you get.

If you continue to experience difficulties, it also helps to show where the errors are occuring, along with the number of Node IDs returned. If you don't return any Node IDs, then your gateway has not acquired any and passed them out to LabVIEW (via the serial port). If you get an error before the read (either health or data), then you are likely having connection problems - make sure you have the right COM port selected. If you get an error after the read, then it is probably just a timeout issue. Please let us know!

Regards,

Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
0 Kudos
Message 31 of 154
(3,388 Views)
Hi Astro,

Does your USB gateway show up as a COM port? That is required for the LabVIEW driver to work. Also, have you been able to get Crossbow's software to work with the motes? Perhaps try the example I just posted for Anil. Please let me know what you get.

Regards,
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
0 Kudos
Message 32 of 154
(3,386 Views)
Hi all ,
 
I have got my evaluation version expired , have purchased a school edition , in process of getting everything reinstalled , pls give me time till monday .. I will revert with my errors
 
Thanks all for this wonderful support and follow up !!
 
regards
Anil
0 Kudos
Message 33 of 154
(3,373 Views)
Hi Ryan, I tried the program you attached but I'm still getting the same error.  I am not interrupting the program in any way.  Now one thing I want to add is that when I first downloaded the drivers for the Crossbow USB, and then plugged it in, I allowed the USB controller to search for the appropriate drivers.  Is this okay?  Should I have done something manually instead?!

Thanks.
0 Kudos
Message 34 of 154
(3,362 Views)
Hi Astro,

What COM port does the MIB520 show up as? I assume that you've seen this KB. Your available COM ports can be found in Measurement and Automation Explorer (MAX) under Devices and Interfaces->Serial and Parallel. Does this list of COM ports change when you plug and unplug this gateway? Whatever number is added or removed should be the COM port you use in the example. Please let us know.

Regards,
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
0 Kudos
Message 35 of 154
(3,333 Views)

Hi all,

Sorry for the delayed reply.just to give an overview of what I have currently done so far .

My existing config

  1. Labview 8.5
  2. MIB 510 gateway device
  3. MTS 300 Sensor device
  4. mica2 mote

I have configured the mica2 mote to sense temperature and connected the gateway device to the COMM port and connected the mote and the sensor on the gateway device, I was then able to view the temperature sensed by the sensor on my desktop machine which is connected to the COMM port.

The COMM port here is COMM1.

Now I would like to view the same result with Labview.

Problem : Keeping the existing setup as it is ( ie mote configured to sense the temperature) I need to execute a VI Read Data and Display Health with Variable Rate.vi .

NI provides drivers for both Sensor and the Gateway with the same directory structure and files. Now I am in a fix as of which vi to use , the VI for the sensor or the VI from the gateway.

Can anyone let me know which VI should I use in order to have the correct output

thanks

anil

 

0 Kudos
Message 36 of 154
(3,271 Views)
Hello Everybody,

I am just beginning in my work of Wireless Systems and I have the same problem.... The VI does not run and say that It has occurred a fail (error 8000?). The other thing is if you could you please explain to me which VI should I use, I mean MTS400 1 Sensor N point, 1 sensor 1 point or N sensors N points? Anyway using whatever of these I have no aswer of the program. I am using the software in Labview 8.0 environment.


Thank you very much,
Rafo
0 Kudos
Message 37 of 154
(3,167 Views)

Hi Rafo,

At which point of the execution do you get the error. What is the error number and on which COM port does the device show up? The previous posts discuss a lot of details on how to fix this error.

You set the Read.vi to N Points and N Sensors, if the system has multiple sensors and points to read from. It is usually set to NSensor NPoint, but it ultimately depends on the configuration of your system

anilhk: Both the set of VIs (Sensor and the Gateway) should be the same. Using either one of them should be fine. There are many VIs which work with multiple devices. This abstraction is done with the help of VISA (in this case).

0 Kudos
Message 38 of 154
(3,122 Views)
Hi Rafo,

I'd also like to add that you should attempt to get your hardware up and running with the provided Crossbow software. Are you able to read data from them with it? The way the LabVIEW driver works is that it simply connects to the Gateway which forwards packets broadcast across the network. You simply need to call a read VI of the appropriate type of sensor with the correct Node ID, and the driver will parse that packet according to the structure of the specified module. It will return the sensor data in engineering units. Whether you use 1 or N Sensors, or 1 or N Points depends on what you are attempting to do. N Sensors allows you to read from multiple motes with the same read call. The caveat is that if all of them have not returned data in the timeout period, you will get a timeout. N Points allows you to read multiple data points from the same read call. The caveat here is that if the mote has not returned the specified number of packets since the last read through the timeout period, you will again get a timeout error. Because of the slow update rate typical of these motes, I recommend using only 1 Point, unless you modify their firmware. Also, to keep things simple, I would use 1 Sensor until you get your entire network up and running. You can use the "Get Node List" VI to determine which motes have connected to the gateway as well. Please let us know if you have any more questions.

Regards,
Ryan
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
0 Kudos
Message 39 of 154
(3,107 Views)
Hello everyone,
 
I have an MIB520 board and Mica2dot motes. When I plug in through USB, I see the com4 port and there are no errors. I am using the Crossbow XMesh WSN driver.
 
However, no id's show up. The motes are transmitting, but maybe they're not transmitting the right data. There's currently no id metadata. Is there a specific piece of information that labview is expecting? I'm just trying to get id's to show up.
 
Thanks for all you guys do!!!!
 
Dan Lambert
Application Developer


Message Edited by e8y8 on 02-11-2008 03:41 PM
0 Kudos
Message 40 of 154
(3,084 Views)