11-18-2011 12:09 PM
I am now working on a project.We have two singleRIO Board 9632 ,Each of which can be used to control a motor independently . Relative requirements are as following:
1. In each singleRio 9632,A FPGA VI implements PID control and RT VI generates reference points.
2. Two singleRio 9632s can exchange data in real time by using Ethernet.
3.We hope we can use one hostvi on my computer to supervisor two singlebord9632s .
I am not sure how to implement the hostvi which can make the whole vi run without particular running RT VI when the power of singelboard turn on.
Thanks a lot.
11-21-2011 08:50 AM
Hello,
What would you like to do from your host vi? Do you just want to view the status of your controllers, do you want to be able to start/stop the VI from running on your controllers? There are many options. The easiest way to do this would be to use shared variables to control the state of your two signle board rios. You probably want a variable that each board controls that specifies whether the board is connected or not. You could also use the RT Get Target Information.vi, and have it try to discover which devices are connected.
If you are passing large amounts of data between your single board rios and the host vi I recommend using network streams: Lossless Communication with Network Streams: Components, Architecture, and Performance
If you are interested in being able to remotely start a VI on one of your targets here is a KB that should help: Programmatically Launch an Executable or VI on a Real-Time Controller
I hope this information helps!
Regards,
Matt M.
11-26-2011 04:09 PM
Thanks for your answer.
But I need that the two SingleRIO board can exchange data in real time by using the ethernet port on the board.
How can I do?
11-26-2011 04:34 PM
Actually, I want to exchange real-time data between FPGA VIs running on each Board. Only one way to implement the function is that I add a vi under each RT target,create shared variables. Then the added vi reads,writes the shared variables and transfer the data to FPAG.
I am not sure whether it is a viable method ?
Could you help me ?
Thanks,
Yuefei
11-26-2011 11:48 PM
@yuefeiw wrote:
Actually, I want to exchange real-time data between FPGA VIs running on each Board. Only one way to implement the function is that I add a vi under each RT target,create shared variables. Then the added vi reads,writes the shared variables and transfer the data to FPAG.
I am not sure whether it is a viable method ?
That approach will work, although it will not be deterministic. If your timing deadlines for exchanging data are not too tight, there's no problem. If you have very strict timing requirements, you could add a CAN module to each RIO chassis to allow the two FPGAs to talk directly to each other. Does the single board RIO have a serial port? If so, a similar but less deterministic approach would be to connect the two serial ports together using a null-modem cable (TX and RX crossed), although then you will need RT VIs to read from and write to the serial port.