11-05-2013 10:36 AM
Hi all,
I was hoping for some advice before I start developing an application. I want to try using the actor framework so I thought I would give it a go for this project.
It is a relatively simple application:
Update rates are at 1Khz max so the cRIO is in scan mode. The cRIO will communicate with the host using 2 network streams. One for sending and one for receiving data.
I want to use actor because there will be 3 screens used. One to display the digital inputs, one to display the analogue inputs and one to set the digital outputs. I thought this would be a good chance to have a go at using the framework because I could have 3 IO actors with one on each screen.. My initial ideas are as follows.
Host Application
I have attached the project file I am working with. I have knocked something up using tabs which gives an idea of how the UI will look for each screen.
I’m really not sure if this is even remotely close to the way to do it. Help please.
11-06-2013 03:49 PM
I'm not sure you need to split all of the outputs into separate actors. You could potentially wrap those up into one actor and create a method or small set of methods for each output type. Or, you could create a "Physical I/O" actor, and have that talk to the AO, DO, AI, and DI...then your top level application only needs to send messages like "DO : True" to the Physical I/O actor. Essentially, it abstracts it one more level, and might make things easier in the future if you decided to add other physical I/O (other cards, USB devices, etc.). This way, the Phsical I/O actor could handle the changes, and your top level application remains intact.