Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

AF Sync Messaging

That's a good way of putting it. I think you're right. A mixed pattern may work well. One of the particular things I like about AF is it's great for UI.

One last question....Say I do use "just a class" to handle some of the hardware communication. Where does that object live? One of the upsides of AF is it gives a nice centralized place to interact with that object. If my modules are trying to interact with that cRIO object in a way that blocks other use of the resource, am I stuck with FGV to store that object? That's something I'd like to get away from. It's terrible to track everywhere it's getting called.

0 Kudos
Message 11 of 13
(918 Views)

thutch79 wrote:

However, they each use shared resources (central cRIO for control and data collection, central robot to deliver liquids).

...

What am I missing here? Am I thinking wrong about messaging or about what should be actors?

Are you sure you need a "cRIO Actor"?  It's not really a shared resource in the same way as your robot is.  It's a computer, and can run multiple actors in parallel.  It's the inputs/outputs which are shared resources; do your "modules" need to share these resources (i.e. are they reading the same sensors and controlling the same valves)?

0 Kudos
Message 12 of 13
(918 Views)

Well, this is where my lack of understanding of TCP and network streams hinders me. I was only planning to keep the cRIO code as is. It's fairly stable and runs pretty well. The down side, is all the data comes in bundled together on one TCP connection. Then there is a network stream to handle control (i.e. valve and voltage changes). That's why I always thought of the cRIO acting as one. It's not that I don't understand the basics of network communication. I just don't understand what limits and inefficiencies I will run into. It's a fair amount of data being sent across. We send 8 channels of 100kS/s and 32 channels of 5kS/s. It all gets sent over as 16bit integers flattened into a string. That's a total over all modules. The control side is on demand only. Breaking that up into 8 independant streams seems to be a daunting task, but maybe I'm wrong.

Edit: All the cRIO code was written by a former employee that I no longer have access to.

0 Kudos
Message 13 of 13
(918 Views)