LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing hardware resources between events in Queued Message Handler

Hi everyone!

 

I would like to run RT codes (based on the QMH design pattern) on NI myRIO. Ed Doering provided a nice example.

 

After studying this example and extensive searching, I still don't understand how to do basic tasks based on the QMH design pattern, tasks such as setting digital output on a single myRIO digital I/O.

 

My question is: how to pass hardware references between Message Handling Loops? I know a little bit about Channel Wire Handler template. I use shift registers to pass references in the CWH design pattern.

 

My understanding is I have to open the I/O in the initialize case, then I write False or True to the digital I/O in another case. But I don't know how to do this in the QMH design pattern.

 

Thanks! 

 

 

 

 

 

0 Kudos
Message 1 of 4
(843 Views)

It is much easier to make suggestions about your VI when we can see your VI.  It is best to post your VI as a .vi file -- some people (myself, included) get "upset" if you attach a "picture" of your VI, one we can't edit, modify, and attempt to run (to see what happens ...).

 

I'm doing this right now, as you probably know.  So show me your efforts and I'll comment on it, or show you how I'm doing it.

 

Bob Schor

0 Kudos
Message 2 of 4
(797 Views)

Hi Bob,

 

I even couldn't write a semi-functional program using QHM and myRIO.

 

I'll appreciate it if you can give me some hints on how did you do it.

 

Thank you!

0 Kudos
Message 3 of 4
(755 Views)

For a myRIO there are two parts that you need to program, the RT Linux and the FPGA. You can use the QMH for the RT Linux part, I don't recommend using for the FPGA part.

 

There is no UI in the RT Linux part of myRIO so any parts of the QMH that have a UI need to be stripped out. This would include Front Panel Events.

 

I suggest starting with a simple State Machine (JKI) on the RT side(the JKI is also a QHM), add separate JKI SMs linked by USER EVENTS if you need more than 1 loop on the RT side.

 

mcduff

0 Kudos
Message 4 of 4
(748 Views)