Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

VI should execute on Host computer-But Sub VI should execute on Target.. is it possible ?

Hello NI Folks,

 

I am working on a Image acquisition application, where my camera is connected to compact RIO. When I started to develop this application, I have taken one example "Grab and set up attributes.VI" in labview and modified as pe r my requirements. I have just added folder creation code at front of this basic VI and image processing code at the last. It worked fine on my PC. But when I deployed that on my cRIO, due to property nodes, my VI is not working.

 

So now I want to split my VI into three different VI's. First VI should take care of creating folder for saving data and setting attributes to camera, second VI is only for acquisitionand saving, Third one should do some image processing. All these three vi should execute in sequence. But the problem is first VI(Foder creation and attributes setting) should execute on host, second VI (acquisition) should execute on target, third VI(Image processing) again on host.

 

1)can anyone please give me an idea, how to execute three VI's in sequence with first VI on host, second VI on target and third VI on host ???

 

2) Is it possible ???? I know how to use sequence structures, but I dont know how to transfer execution control from host to target in sequence steps.

 

3) Is there any better way to make my program work on RT Target other than splitting my working VI into three???

 

I am attaching the basic VI from which I developed my application.

 

Thanx in Adavnce

 

Regards

Neo

0 Kudos
Message 1 of 5
(5,500 Views)

Hello Neo6,

 

Yes, you can run a vi from your host on the target with the vi server, but i did not recommend such an architecture.

 

What you can do is to create a VI on the target that waits on a command from the host, if the command is

arrived the vi executes the function you want on the target and gives after this a message back to the host.

The communication between target and host can be done with network variables, network streams, TCP/IP

or UDP.

 

A good starting point

Transferring Data over a Network

best regards
Alexander
Message 2 of 5
(5,488 Views)

Hello Alexander Glasner,

 

Thank you for the reply. I will try to design the model and report you back. But it would be great if you can recommend me some example in Labview or some Standard templates (like Master-slave) where I can test a simple applicaition.

 

Thank you once again

 

Regards

Neo.

0 Kudos
Message 3 of 5
(5,486 Views)

Hello Neo6,

 

what can help is the NI LabVIEW for CompactRIO Developer's Guide.

 

You can also use the producer consumer example and replace the queue with a

network stream the the consumer can be run on the target for sending data back

to the host a second network strem must be implemented.

best regards
Alexander
Message 4 of 5
(5,477 Views)

Hello Alexander Glasner,

 

Sorry for my late reply. Your idea seems to be great. Once I implement it..I will report you back

 

Thank you very much for the support

 

Regrds

Neo.

0 Kudos
Message 5 of 5
(5,459 Views)