Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Suggestions on cFP RT architecture for this application?

Hi Folks,
 
I have been using the cFP-2010 (I know it's superceded already) for a few months now, but only *recently* have began to use the RT side of things. Perhaps a deterministic approach isn't even neccessary for our needs. I have spoken with a local field engineer and worked through the RT tutorial on the Training Modules CD. However I'm still helplessly trying to come up with a good structure for this application.
 
Currently I am using the logos protocol to create a pseudo-bridge between the host application and a piece of lab equipment attached to the cFP. It works exceptionally well, but it was created with no true RT/deterministic approach. It simple waits for a command via logos, commands the piece of equipment, reads the data back, then pipes it over to the host. There's an atomic/bi-direction 'status' flag to trigger reads/writes. This happens maybe once ever 5minutes. I'll try to attach the VI's at the end.
 
FYI this is RT 8.5.1 (Devel) with a target of cFP-2010 and host is a WinXP machine.
 
What I'm getting hung up on is making the move to a more proper approach to integrate another serial-based piece of equipment. This device (a flow controller) *does* need to be polled constantly to read data for use/display on the host. The host needs to be able to write to it as well. I have VI's working for use on the host's local RS232 port, but I haven't 'ported' them over yet.
 
The approach I first took(a new project, ommiting the first piece of equipment) was to have a time-critical loop take care of the serial reads and writes for the flow controller. This was setup as a state machine. It communicated with a lower-priority thread to receive commands (state changes) from the host.
 
So time-critical to lower priority via a single-process enum
lower priority to host via network published enum.
 
Again I had to use an additional boolean network published to flag when states changed, because the timestamps are only updated when the var changes.
 
The use of network published variables seems 'bulky', for lack of better terms. Can you folks offer some advise to get me in the right direction? Maybe I should scrap the RT thought and just use what works?
 
Thanks for your time!
Jamie
 
PS - sorry for the lack of support files, I can't upload zips!(encrypted on my end).
v2009 devel. w/RT
0 Kudos
Message 1 of 5
(3,574 Views)
'cmon, no suggestions? It's pretty sad that I have to pay $1200+ for RT training just to get off the ground.
 
</rant>
v2009 devel. w/RT
0 Kudos
Message 2 of 5
(3,549 Views)

Jamie,

I would suggest you take a look at the STM protocol that was developed by some of the Systems Engineers at NI.  This tool offers a very efficient way to setup a command based message system between the windows host and the RT target. This should help you get started with a good RT architecture.

 

SteveA
CLD

-------------------------------------
FPGA/RT/PDA/TP/DSC
-------------------------------------
0 Kudos
Message 3 of 5
(3,546 Views)

Steve,

Thanks kindly for the suggestion: I'm reading over it now. It seems to be right in line with what I'm in need of.

Sorry for the 'outburst', my frustration 'got the best of me.

Regards,

Jamie

v2009 devel. w/RT
0 Kudos
Message 4 of 5
(3,543 Views)


8bitbanger wrote:

Sorry for the 'outburst', my frustration 'got the best of me.



No problem... I guess your post caught people right at the weekend...I know a lot of people monitor the board over the weekend... my self included most of the time, but this weekend was one of thoes where I was trying to stay as far away from my computer as possible Smiley Wink
SteveA
CLD

-------------------------------------
FPGA/RT/PDA/TP/DSC
-------------------------------------
0 Kudos
Message 5 of 5
(3,540 Views)