Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

How to start new vi on cRIO?

Solved!
Go to solution
Highlighted

Hello,

 

I would like to do two things:

 

1) I would like to start a new vi from cRIO level but the vi is on the host. I thought to use Invoke Method : Run VI but I do not know how to use it with cRIO and two different paths. I mean cRIO has c disc and host as well. What I am doing now I start the vi on the cRIO and after on the host but I would like to automated it.

 

2) I have two vi's running, one is on the host and one is on the cRIO. They have two different timing. On cRIO has 10ms, on the host 20min. How is possible to stop them in the same time? I mean interrupt the vi on the host between cycles?

 

Thank you for any help.

 

Best regards,

Kamil

0 Kudos
Message 1 of 6
(3,108 Views)
Highlighted

No suggestions?

0 Kudos
Message 2 of 6
(3,082 Views)
Highlighted

Hello Nemesis,

 

I'll start with the last one first.

 

One thing you could use to communicate between both VI's  are Network Published Shared Variables.

More information about this can be found on http://zone.ni.com/devzone/cda/tut/p/id/4679

 

Regarding the second question I have made a small example for a cRIO here at the office (see attachment).

 

Please note that:

- You should add your own target to the project.

- You will have to change/check the respective IP-addresses (Host and Target)

- Also make sure to enable the VI-server (see http://digital.ni.com/public.nsf/allkb/F4010DD5C8D1B13D862565BC007384E9 for more information about this)

 

Can you let me know if this solves your issue?

Kind Regards,
Thierry C - CLA, CTA - Staff R&D Engineer, RF Semiconductor Test - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 3 of 6
(3,072 Views)
Highlighted

Thanks for replay Thierry,

 

1) Regarding the first answer. I did it as well but the problem is that I have to wait until loop is activated. My second loop for example has time step 20min. I want to stop it faster. Please look at the vi test. It is an example what I am speaking about. When I stop the fast loop that has 10ms I have to wait 6 second for stopping the slower loop. Is it possible in the same time?

 

2) I think it is what I was looking for!!! I will give it a shoot but it seems to be good for me. Many thanks.

 

Best regards,

Kamil

0 Kudos
Message 4 of 6
(3,037 Views)
Highlighted
Solution
Accepted by topic author Nemesis

Hello Kamil,

 

It is possible to abort a Timed Loop from somewhere in your code, but please be careful with it.

 

If you abort a Timed Loop, then you do not know which actions have been executed in the Timed Loop and which haven't.

 

In attachment you can find an example that also illustrates the error that is shown when aborting a timed loop.

Kind Regards,
Thierry C - CLA, CTA - Staff R&D Engineer, RF Semiconductor Test - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
Message 5 of 6
(3,028 Views)
Highlighted

Thank you for your help I think it is all what I was looking for.

 

Best regards,

Kamil

0 Kudos
Message 6 of 6
(3,025 Views)