Wireless Sensor Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

WSN 3202, 9791 signal loss handling with timeout

I was running into communication loss issues and discovered the timeout option. I'm reading from 300+ nodes digital input in CNC machines about every 2 seconds. Anytime I get an event change on the DIO0, I insert data into a database. The problem was that I'd lose communication to nodes and want to put a "machine not running" event in the database and do this after a 5 minute timeout. Well I have 7 while loops looping at 2000ms and 36 I/O variables in each loop. My current problem is when I set a constant or local variable to the timeout on each I/O variable now my while loop slows down to the 5 minute timeout speed. I want to keep looping at 2 seconds (2000ms). It seems like my while loop is now dependent on the longest timeout.

0 Kudos
Message 1 of 3
(5,249 Views)

I think I figured out one solution. I created a while loop consisting of the inpout local variable integer setting the DIO0 timeout and then an output local variable of the boolean T/F timeout and then input that boolean local variable in my 2 second while loop to control the database insert.

 

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

Attached is my simple VI for testing one of my nodes when communiaction is lost. In my main VI I'm now going to have to create hundreds of local variables to get data of each I/O variariable from the timeout while loop to the faster data collect/record while loop.

 

Edit: Nevermind about the attachment. My work computer won't let me upload anything.

0 Kudos
Message 3 of 3
(5,245 Views)