LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

event structure in a project using RT target

Hello.

 

As i was already told, i can't use dynamic events on RT targets. Can you suggest me a solution?

 

I have the following project:

proj.JPG 

Not a Real-Time Project. But project that using RT target: NI cRIO 9074.

 

My main VI looks like (part of it):

mainVI.JPG

It is implemented by  while loop, which runs until START button is pressed. The button pressed after all the values are set, and then the scan begins. 

When i was developing this VI outside the project, I used event structure for save to new/existing file, show graph buttons (the white buttons). Because it should not interrupt the while loop (user can make setting, then press show graph, then set something again and only then press START).

It was like here:

mainVI_block.JPG

Now, i wanted to bring all the parts together and put that VI in the project. In addition i wanted to add few buttons, like <-- and --> which are moving the motor manually before the scan starts. BUT, it didn't work.

 

Now I'm stuck 😞

How can I implement what i describe above in my situation?

 

Thanks!!! 

0 Kudos
Message 1 of 2
(2,584 Views)

Hi Tacchi,

 

Are you planning on running your application as a startup executable or from the development environment? If you are planning on running this from the development environment, probably the closest thing you will get to the behavior you currently see with an event structure is by polling the value of the control that you wish to trigger the event. For example, if you wanted an event to be triggered when a button is clicked, you can have a while loop with a case structure inside of it that performs whatever code you want when the value of the button is true:

 

polling.png

 

Granted this is not the ideal translation, but since RT applications are meant to run headlessly without a front panel, it may be the best option for your application.

 

Hope this is helpful!

 

Aaron P

National Instruments

Applications Engineer

http://www.ni.com/support

 

 

0 Kudos
Message 2 of 2
(2,538 Views)