Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Connect VI in the NI SmartCamera and a Computer VI

I have two VI, one in the computer and one in the NI SmartCamera 1744

I need that, when one of the VIs finishes his job, he start the other VI

but i cant find a way to do that

 

i already tried to drag one VI into the other, but it show me a lot of errors

 

Someone can help me?

 

Thanks

Matheus

Matheus Alejandro
Estudante de Engenharia de Controle e Automação
Unesp - Sorocaba
0 Kudos
Message 1 of 7
(3,742 Views)

Perhaps use a shared variable to communicate between the hardware.  When the first vi finishes, it sets a boolean shared variable to True.  When the second one sees a True value, it sets it back to False and starts running.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 2 of 7
(3,737 Views)

I already tried this, but it doesn't work

but, thanks for your help

0 Kudos
Message 3 of 7
(3,727 Views)

Hi Matheus!

What error are you getting when you use a shared variable?

Could you attach your VI's (SmartCam and Computer)? So we can see what is going on...

 

Thanks!

Barbara Pracek
Engenharia de Aplicações
National Instruments Brasil

0 Kudos
Message 4 of 7
(3,715 Views)

There it is, that's my program

 

If someone can find a way to do the VI from computer start after the VI from the camera finishes, please help me

Thanks

Matheus Alejandro
Estudante de Engenharia de Controle e Automação
Unesp - Sorocaba
Download All
0 Kudos
Message 5 of 7
(3,702 Views)

I forgot to say that the Untitled.vi is in the camera and the Principal.vi is on the computer

 

 

Matheus de Almeida Alejandro

Student of Engineering of control and automation - Unesp - Sorocaba

Matheus Alejandro
Estudante de Engenharia de Controle e Automação
Unesp - Sorocaba
0 Kudos
Message 6 of 7
(3,700 Views)

Hi Matheus!



You can fix your problem using a shared variable, wich will allow you to use the same variable in two different VI's.


How are you connecting your camera and your host computer? Using a network? So, you can use this network to share your variable.



You can do it easily, first you have to use the "Project Explorer" window. When you start the labview, click on "Create New Project".

There you can open your two vi's.



Now, you can create your shared variable. Right click on "My Computer" -> New -> Variable There you will find the same screen that are attached here, choose:

Variable Type: Network Published

Data Type: You have to choose, in your case, I guess the best option is "boolean", because you want to turn-on one vi when the other turn-off.



So, you will have created your shared variable. You can drag it at your vi's to use it.



In one vi you will write to the variable when it is turned off, and in another you read the state of that variable, when the state of this variable changes you startup the other vi.



To change the read/write mode, right click on the shared variable -> properties, and then chosse the correct option. (You can see another pic attached.)



Hope have helped you! If you get any problem, please let us know!


Best Regards!

 

 

Barbara Pracek
Engenharia de Aplicações
National Instruments Brasil

Download All
0 Kudos
Message 7 of 7
(3,696 Views)