取消
显示结果 
搜索替代 
您的意思是: 

CAN

已解决!
转到解答

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 项奖励
1 条消息(共 5 条)
3,784 次查看
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.
2 条消息(共 5 条)
3,763 次查看

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 项奖励
3 条消息(共 5 条)
3,749 次查看
解答
接受人 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
4 条消息(共 5 条)
3,721 次查看
Thank you for your help!
0 项奖励
5 条消息(共 5 条)
3,713 次查看