FieldPoint Family

cancel
Showing results for 
Search instead for 
Did you mean: 

White Paper - Multi Process Realtime & Compact Fieldpoint

Hello,
 
I originally posted a question on this topic here: http://forums.ni.com/ni/board/message?board.id=110&message.id=5521.
 
I got one reply, and later decided to investigate the Topic further. I produced a document / "white paper" on the subject that I called:
 
"Experience with Multi Process Realtime Systems Using LabView & Compact Fieldpoint"
 
 
Please give me feedback on the subject! As I say in the paper:
 
"I wanted to report what I have found so far, and also get more discussions around this exciting topic."
 
 
Geir Ove
Message 1 of 9
(5,925 Views)

Thanks for posting your findings.  Still digesting all the information.

In order to replace the While Loop on the State Machine, you will need "right click" on the while loop and select "Unlock code from state machine".  You can then replace the While Loop with a Timed Loop.  Unfortunately this means you can no longer use the state diagram editor with this state machine.

0 Kudos
Message 2 of 9
(5,884 Views)

Hello,

Thank you for your reply. Yes I know I can unlock the code from tthe State Diagram. 

However, the problem is that some States in in some of the State Diagrams may call a process that in some cases will not return for a long time (but they run in a Loop and do yield processor time by calling Wait (6 ms): 70% of the loop time is spent in Wait).

Thus we have a Outer Loop (The outer State Machine) that calls an Inner Loop that may not return in a long time, but does regulary yield processor time.

In this Scenario, a Timed Loop in the Outer Loop will not work since it has a fixed interval.

Message Edited by geirove on 03-12-2007 03:57 PM

Geir Ove
0 Kudos
Message 3 of 9
(5,881 Views)

Hello,

I have updated the white paper. There is a new Audit section in the document showing what has been updated and where.

Download the updated document from our web site here: http://objective.no/multi_process_cfp_realtime.htm

or directly here: http://objective.no/white_papers/multi_process_cfp_realtime/Multiple_Parallel_Processes_under_Realti...

 

Geir Ove
Message 4 of 9
(5,851 Views)
Geir,

There's a trick you can use to raise the priority of code in a diagram. By putting your while loop in a timed sequence, you can assign it any priority available to timed loops, while still getting the non periodic functionality of a while loop. As you mentioned, you'll still need wait statements to yield the processor. I'm not sure if this will help in your case.

-G
0 Kudos
Message 5 of 9
(5,844 Views)
Thanks G,
 
You are to modest! That was a really Great Tip !  May I quote you and your solution in my "White Paper"? I will refer to you: Would be nice with a name !
 
I have to Unlock the State Machine to do this though. Not to much of a problem: I will need to keep two copies of each State Machine: One locked (original) and one unlocked.
 
So, I guess it is then only the Garbage Collector that will interrupt anyting above High Priority? (ie. the Timed Sequences & Loops) ?
 
I do indeed miss more information from NI on their Real Time implementation(s):
 
Engineers make decions based on data they have available:
Not possible to make smart decisions about a topic where you have no (or very little) data available....
 
Geir Ove
0 Kudos
Message 6 of 9
(5,834 Views)
Geir,

We're aware that we need to do a better job of getting RT architecture information out to customers. I recently created an advanced resources page for LabVIEW Real-Time development that could be helpful to you. It's a start, but we have plans to add more content here.

Gerardo
0 Kudos
Message 7 of 9
(5,824 Views)

Hello Gerardo,

I was not aware that you work for NI. I have some important questions for you:

Assume we use your trick and wrap a Timed Sequence around the outer Loops of State Diagram Toolkit generated code.

Now the user code runs at a Priority above High Priority, but below Time Critical Priority. Right?

Questions:

1) Which, if any, System (RTOS) processes will Preempt User Code running at this Priority Level ?

(Probably the Memory Manager / Garbage Collector, but we are not doing any operations which should make GC kick in)

2) If the User Code still can be preempted by System Processes, what is timewise the upper bound (apart from GC) of these processes?

i) The System Processes may run for a long time, so the Time Slice of 10 ms will be the upper bound ?

ii) The time is much shorter, shorter than X ms, where X is ?

Please, knowing this will give us more peace of mind !

And, if you may, which processes may Preempt High Priority?

----

We have run our endurance test now for 39 hours and it has performed 150.000 Relay Operations as described in the White Paper. It has met the expected Min / Max response time perfectly every time.

It has 24 processes running at High Priority and one Communication Process using Shared variables running at Normal Priority. So the system seems to work, but we must know before deploying the system at the customer site!

 

Geir Ove
0 Kudos
Message 8 of 9
(5,807 Views)

Hello,

I wanted to follow up on my own questions so that others reading this thread also can find the answers to the questions asked:

The solution to the problem of running several processes (State Machines) in Parallell is indeed to wrap a Timed Sequence around the VI containing the State Machine:

Timed Loops and Timed Sequences run at a Priority level Above High Priority, but Below Time Critical Prioirty. I believe the only System Process that will interrupt "Timed Loop Priority" is the Garbage Collector (Meomory Manager).

I will update the White Paper at our web site as soon as I get the current project out of the way: We may even through in some more "goodies" / experiences that we have made.

 

Geir Ove
0 Kudos
Message 9 of 9
(5,621 Views)