Hobbyist Toolkit

cancel
Showing results for 
Search instead for 
Did you mean: 

Running a LabVIEW program automatically according to the command from Arduino card

  • Hello...I want to run a LabVIEW program automatically in my pc according to the output from an Arduino card..how it's possible..also to control buttons in vi to by using Arduino card
0 Kudos
Message 1 of 8
(2,838 Views)

Well how exactly do you want to trigger the execution on the PC?  You probably want a program running on the PC to monitor for the command from the Arduino.  You could use any communication protocol supported both by the Arduino and LabVIEW or you could use a physical IO to trigger the process also.  Unless you have a limited number of buttons you probably want to pass information back and forth through some type of communication protocol.

 

I am not an Arduino export so I don't know which communication protocol would be best for you to use in this situation.

David Wilt
The New Standard LLC
0 Kudos
Message 2 of 8
(2,786 Views)

Sir.. first of all thanku for ur reply.. actually I need to execute a LabVIEW program upon getting a high/low response on the output of Arduino...I want to start execution of LabVIEW program on receiving a message from my phone using Arduino+ LabVIEW setup

 

0 Kudos
Message 3 of 8
(2,782 Views)

I think you have stated 2 things here:

 

1.  You want the LabVIEW program to do something based on an output from Arduino.

I need to execute a LabVIEW program upon getting a high/low response on the output of Arduino


For this you will need some type of DAQ to feed your LabVIEW program.  If it is going be running on a Raspberry Pi you can get a HAT with the IO you need and then see if someone already developed a driver for that HAT in LabVIEW.

 

2.  You want to start the LabVIEW program.


I want to start execution of LabVIEW program on receiving a message from my phone using Arduino+ LabVIEW setup

Why can the LabVIEW program not just run at all time looking for the IO trigger?  You can set the LabVIEW program to run on boot of the PC or Raspberry Pi.  Otherwise you can launch LabVIEW from command line on a PC so what ever interface you want to get the command from your phone to the PC will work.

David Wilt
The New Standard LLC
0 Kudos
Message 4 of 8
(2,778 Views)

Thankyou very much sir

0 Kudos
Message 5 of 8
(2,773 Views)

Hello David,

 

You mention "You can set the LabVIEW program to run on boot of the PC or Raspberry Pi. "

Could you please explain, how to run the program on RasPi boot?

And even generally, I have a program deployed to RasPi, but it runs only while the interface is running on my PC (think about that RasPi Linx example). Once I stop/kill the interface, the program stop to run on RasPi as well.

So, basicvally, I need the program to run on RasPi headlessly and start on the boot.

 

Thanks a lot!

-fomine
_________________________________
You can do greater things with LabVIEW!
0 Kudos
Message 6 of 8
(2,272 Views)

Ok, I figured it out.
You need to create a new build in the project, real-time application. Deploy it to RasPi, and set as startup
Never mind 🙂

 

I had a very hard time trying to google it, so I will leave a few keyword here for other poor souls trying to figure it out.

Keywords: LabVIEW Raspberry Pi RasPi headless start on boot

-fomine
_________________________________
You can do greater things with LabVIEW!
0 Kudos
Message 7 of 8
(2,258 Views)

Fomine,

 

I last track of you last comment so this is a bit of a late replay.

 

I just check the LINX examples and as they are all just VIs none of them so the project level with the build you referenced.  As an added resource I found this 4 part blog to be very useful to get started with developing with the Raspberry Pi.

 

https://www.mediamongrels.com/make-ing-with-labview-raspberry-pi-part-1-introduction/

https://www.mediamongrels.com/make-ing-with-labview-raspberry-pi-part-2-installation-configuration/

https://www.mediamongrels.com/make-ing-with-labview-raspberry-pi-part-3-raspberry-pi-setup/

https://www.mediamongrels.com/make-ing-with-labview-raspberry-pi-part-4-user-interfaces-with-labview...

David Wilt
The New Standard LLC
0 Kudos
Message 8 of 8
(1,883 Views)