12-20-2010 01:24 AM
Hi all,
I have a architecture for my application. Basically, it has a Master / Slaves type of design, all running cRIO.
I have a configuration file which list all the type of I/Os and what are their alias were. Basically it list out the whole memory table of data for Master Slave communication.
For example my Memory Data has 2 cluster, "Master Control" which reads in some analogue data from a joystick and "Slave Output" which outputs analogue to drive some motor.
The task flow is somehow like this.
<Master>
Read controls -> "Update Memory Data" -> "Send Data via serial" -> "Receive Data via serial" -> Update "Memory Data" -> Update "Indicators"
The memory table is universal for master and salves. My config file is in XML format.I have a few questions in mind.
1.) Is it possible to bind I/O variables pragmatically (during runtime on cRIO)?
2.) As all master and slaves use same "Memory table layout", how can i not duplicate it in my project explorer?
Many thanks in advance!
12-23-2010 10:02 AM
Hi there,
Do you really need to bind I/O variables to anything? It sounds like you just need to dynamically access channels based on the config file.
You can access channels by name using the programmatic API: http://zone.ni.com/devzone/cda/tut/p/id/9351
You only need to use binding if you want to use an I/O alias, which is a statically configured node on the diagram.
How many cRIO targets do you have in the system? You can use the CCC reference architecture for table comm. between two controllers: http://zone.ni.com/devzone/cda/epd/p/id/5328