ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CAN

Solved!
Go to solution

I have three loops that operate independently controlling separate devices. I would like to poll them continuously for about five seconds at a time. The reason for polling each of the devices is that I would like to communicate from Labview via one CAN device (8473). Is there an easy way to accomplish this polling/ multiplexing task and maintain each loops independence?

 

Thank you.

0 Kudos
Message 1 of 5
(3,923 Views)
Add a fourth loop that handles the CAN communication.  If I'm understanding correctly that you want to poll each device exclusively for 5 seconds, the CAN loop can poll each device one at a time for 5 seconds, and pass any data received back to the relevant device loop using a queue.
Message 2 of 5
(3,902 Views)

Yes, you understand correctly. I think I undestand what you're suggesting, I'm just not sure how to go about implementing it. It seems to me the fourth loop that you're suggesting that I create would poll each of the other three loops. During each period when a device was being polled the fourth loop would close the correct switches (via GPIB w/ a 34970 which I'm using) to establish CAN communications with that device. The fourth loop would also send & receive CAN transmissions which are the same for each device. My problem is figuring out how I can poll and maintain the independence of the loops. Is there possibly an example in the LV library that might help?

 

Thanks

0 Kudos
Message 3 of 5
(3,888 Views)
Solution
Accepted by chuck72352

Here's a rough sketch of what I'm suggesting.  I don't know if there's a shipping example that demonstrates this exactly, but there are certainly examples on the use of queues for communication between loops.

multi-loop sample.png

Message Edited by nathand on 02-15-2010 09:34 AM
Message 4 of 5
(3,860 Views)
Thank you for your help!
0 Kudos
Message 5 of 5
(3,852 Views)