LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview Drivers for Wireless Sensor Networks

Hey Kim,

 

You may was to start by looking at this KnowledgeBase article.  It'll help guide in getting the connection set up.  The thing to keep in mind is that you won't be able to get truely simultaneous readings.  You'll have to use error handling (flow control) to setup sequencing of events that iterate in a loop.  This meaning you'll read from one mote, then read from another mote, then repeat.  If you search ni.com for flow control you'll find some usefuly posts and documents.

 

Thanks,
David

Message Edited by David P. on 02-02-2009 09:59 AM
David Pratt
Group Manager for Application Engineering Specialists | Automated Test
NIC
Message 51 of 154
(2,939 Views)

Thanks David! I have further questions as I set up. Please help...

 

I’ve followed the instruction until:

5. Change the Gateway VISA Resource Constant to the second COM port created (usually COM 4). 

The second port on my pc is COM 6. I couldn’t figure out where is the Gateway VISA Resource Constant. Is it the first block in the block diagram as attached?

 

How should I connect both my MDA300 and MTS400 to the block diagram and view the read data repeatedly from one mote to the other? As for now I could notice only one mote in the block diagram. I changed to either MDA300 or MTS400 I get the error as attached.

 

Please advice in how should I proceed.

 

 

0 Kudos
Message 52 of 154
(2,924 Views)

The Resource constant is the VISA Resouce constant.  It is the purple box with the I/O label at the far left of the VI.

 

To use both instruments, you will need to have two sets of the Open Read Close Clear VI's.  You will use the error wires to control the execution so that one operation happens after the other.  You have to do the complete operation and then close and clear and then reopen the session to the other resource (in this case your other DAQ).

 

Excuse me if I state some of this information incorrectly.  I'm relaying some information from DavidP who posted here earlier.

Ben

National Instruments
Certified LabVIEW Associate Developer
Certified TestStand Developer
0 Kudos
Message 53 of 154
(2,889 Views)

Thank you Ben & David for the reply!

 

Open Read Close Clear VI's, do u mean I hv to open 2 VI's at the same time?

Error wires,  can you please gv me some reference on how to use error wires to control execution?

 

Please advice.

 

 

0 Kudos
Message 54 of 154
(2,884 Views)

Hey,

 

When referncing error wires, we're referring to the bottom left and right terminals of the VIs(blocks) on the block diagram.  These error terminals as they're called, help you control data data flow or sequence.  You wire these terminals from one VI to another in the order you want the VIs to run.  So in your case, you'll want to have the open, configure, start, stop, clear vi for your 400 to run, then wire the exiting error wire of the clear to the open VI for the 300's resouces.  You'll then configure, start, stop and clear the 300's resource.  All of that will need to be within a while loop that iterates continuously until you select stop.  This will cause the read of both the 400 and 300 to happen back and forth, back forth.

 

Thanks,

David Pratt
Group Manager for Application Engineering Specialists | Automated Test
NIC
Message 55 of 154
(2,871 Views)

Please help! These problems may be very basic to experts like you but as I tried I can't even read data from either MTS400 or MDA300. I don't really know how to fix the problems. I opened he example [LabVIEW]\instr.lib\Crossbow XMesh WSN\Examples\Read Data and Display Health with Variable Rate.vi, as I changed the MTS300 to MTS400, I get 3 errors:

1.You have connected two clusters with different contents

2.You have connected two terminals of different types

Cluster data out, a typedef 'WSN Data (MTS400 1Sensor 1Point).ctl'
cluster of 10 elements,
conflicts with cluster data, a typedef 'WSN Data (MTS300 NSensor NPoint).ctl'
cluster of 5 elements.

3.Array element conflict

 

As I change to MDA300, I get the 4 errors below:

1.You have connected an input of Poly VI to an indicator.

2. You have connected two terminals of different types.

The type of the source is 1-D array of
long [32-bit integer (-2147483648 to 2147483647)].
The type of the sink is void.

3. You have connected two terminals of different types.

The type of the source is double [64-bit real (~15 digit precision)].
The type of the sink is void.

4. You have connected two terminals of different types

The type of the source is long [32-bit integer (-2147483648 to 2147483647)].
The type of the sink is void.

 

Please help. How can I solve the problem?

0 Kudos
Message 56 of 154
(2,850 Views)

Dear David and all..

Or can you pls gv me reference on how to connect Crossbow products in Labview? like tutorial... just specifically for Crossbow products that I bought using Labview so tat I can learn faster in either connecting or fixing errors as I have limited time. As I browsed throught the sites, there are too many references which I can't find help for my situation.

 

Please advice.

Thanks, Kim

0 Kudos
Message 57 of 154
(2,833 Views)

Hey Kim,

 

Since the issue you're experiencing is a new issue off of what the original poster had, we encourage you to post your particular issue as a new thread so other customers and community members can help you more than on previously posted and solved thread.  The biggest concern you should have is learning how LabVIEW uses data flow for the majority of its processes.  Post on a new thread and this will allow us to get more assistance from the community.

 

Thanks,

David Pratt
Group Manager for Application Engineering Specialists | Automated Test
NIC
0 Kudos
Message 58 of 154
(2,811 Views)

Hi David and all,

I'd gone through the LabVIEW getting started tutorial. I'd start off with knowing how to read from MTS400 first before I move on to MDA300.

 

I tried to modify the examples given in Read Data and Display Health with Variable Rate.vi by replacing the MTS300 with MTS400 from "WSN Read (MTS400 1Sensor NPoint).vi". Attached testing.vi is the file that I modified.

 

As I run it after connecting my MIB520 to my PC and turn the MTS400 on, I keep getting Error 8003 as the JPG file attached. Please check and let me know how can I troubleshoot the error and get my Labview functioning for my devices. Please help.

 

Best regards,

Kim

Download All
0 Kudos
Message 59 of 154
(2,786 Views)

I have more queries...

I tried to modify vi as shown in testing2.jpg. I still get the same error 8003 as in the picture I posted earlier.

I tried to redraw the whole circuit following an example I found in http://forums.ni.com/ni/board/message?board.id=170&message.id=366244

but I get Error 1073807202.

 

How can I fix the error? I wonder if I need to remove the driver I installed from Moteview in Crossbow CD. I just updated the driver to the driver I downloaded ni.com- in CDM 2.02.04 WHQL Certified.

 

Regards,

Kim

Download All
0 Kudos
Message 60 of 154
(2,766 Views)