Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

bind I/O variable programatically

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!

 

 

 

 

 

 

0 Kudos
Message 1 of 2
(2,686 Views)

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

0 Kudos
Message 2 of 2
(2,668 Views)