LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timed polling

Hello. I've been working on a project where I deploy multiple nodes w/ Arduino and XBee. The nodes sends a string to the base station every 8 seconds. I am using the VISA function in LabVIEW. If the sent string is matched, a boolean indicator will turn on. This shows that the node is still connected on the network. However, I dont know how to implement such troubleshooting where if LabVIEW hasn't detect the string of the node after 8 seconds, it will automatically prompt the user to check the specific node. I really need some help in this situation. Thank you so much!

0 Kudos
Message 1 of 5
(2,555 Views)

You can do a vi type of GetSet

this VI can have 3 function

reset: initialize all value to a know state

set: set the new value with a new time stamp

get: get if any value are older than 8 sec

GetSet type of VI are basically a while loop that always stop at first iteration and in a state machine (case structure) you build your steps.

When called by any other VI, you avoid race condition and this vi will be very fast to execute.

What version of LabVIEW are you using?

Benoit

0 Kudos
Message 2 of 5
(2,540 Views)

Most probably.

There will be 16 nodes to be deployed. Each node sends a string of 1A0/1 ---> 1H0/1 and 2A0/1--->2H0/1. The string signifies the Zone address, Node address, and alarm state (0 for no alarm/connectivity check and viceversa).

LabVIEW acts as the base station. It receives all the strings asynchronously. Based on the image below, the (SD) is a subvi that matches the string received from the different nodes. The 1A1 boolean is for 1A1 string and below is for 1A0 and it goes on. 

The nodes are programmed to send 1A0 every 8 seconds therefore the boolean turns on every 8 seconds depending on the string the comes first. However, my problem is what if a node didn't send the string or LabVIEW haven't received the expected string to the corresponding node after 8 sec. LabVIEW should notify the user that there might be a problem to the node that was unable to send the string. 

0 Kudos
Message 3 of 5
(2,527 Views)

When you say node, you are referring as the same device send different node status? not 8 different device on the same serial bus? unless it's RS485.

 

So basically the architecture I suggest you will work perfectly.

Set the status... any of them...

and get the status all of them.

 

I still don't know what version of LabVIEW you are using...

so here is a picture of the concept

image.png

 

 

 

 

 

0 Kudos
Message 4 of 5
(2,524 Views)

I'm using XBee as my transceiver and Arduino Pro mini as my microcontroller. All XBees are set to transparent mode. I am also using LabVIEW 2015 MyRio.

 

I will try your suggestion. I hope this works. Thanks a lot!

0 Kudos
Message 5 of 5
(2,507 Views)