From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Running a Labview rtexe from linux beaglebone manually, not on startup

Solved!
Go to solution

So i have configured 1 main.vi and subA.vi and subB.vi . the main.vi runs initially and calls subA.vi , next the subA.vi calls the subB.vi , then subB.vi calls subA.vi, and on forever until stopped.

I'm using the beaglebone device and would like to have some code calling the main.vi explained above.

Currently, it works when I deploy it to the target as startup, but i would like to not have it run on startup, but on a specific trigger or running a code.

Is this possible?

0 Kudos
Message 1 of 10
(3,310 Views)

you might find this discussion interesting,

https://forums.ni.com/t5/LabVIEW/Run-startup-rtexe-in-linux-from-terminal/td-p/3117415,

although i neither tried this method myself, nor do i know what differences between crio and beaglebone exist


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
Message 2 of 10
(3,280 Views)

Seems to me the beaglebone\rt topic only confuses things. The solution and problem are exactly the same on a PC, AFAIC.

 

If a calls b and b calls a, you'll get endless recursion. The parameter stack will grow and grow, until all memory is consumed, and your program will crash.

 

Why not simply let a output the inputs for b, and let b output the inputs for a. Then put a and b behind each other in a for loop. First a, then b. Put the output of b in a shift register, so a can use them.

Message 3 of 10
(3,255 Views)

Thing is that program a and program b don't relate to each other. program a executes some code(transmission) and program b executes some other code(receiver).

 

main program

image.png

 

program a

image.pngprogram bimage.png

 

this is what i got so far, but it is not working as intended. What i want is the following:

When digital i/o #12 is on, it calls program a that's stored on the beaglebone. program a will blink a LED at a certain speed then call program b also on the beaglebone. program b will blink LED faster rate and call program a again. What I want to to continue this progress for as long as i/o pin 12 is ON.

As soon as i/o pin is OFF, then i would like to stop program a and b, but keep the main program on because it monitors the i/o pin. When the i/o pin is ON then, start the same process explained above.

 

Any suggestions?

0 Kudos
Message 4 of 10
(3,225 Views)

image.png

This is what I got so far, I have deployed and it looks like it runs without errors.

I am thinking tho both VIs need to be open. this applications is a test application for the real application. I am afraid of having both VIs open due to memory issues, any thoughts?

0 Kudos
Message 5 of 10
(3,218 Views)
Solution
Accepted by topic author cdiaz093

When you dynamically run the VI's, you immediately do an abort. That will stop the VI you just started.

 

Also, when A calls B dynamically, both VI's are in memory too. You shouldn't worry about this until it's a problem. Make the simplest solution, if (and only if) memory is a problem: optimise.

0 Kudos
Message 6 of 10
(3,202 Views)

Still having issues, I can't find a way of opening a subvi and inside this subvi have an intentional stop of the subvi but keep always the main vi open. I've tried asynchronous call, and run vi reference.

for example using run vi to call the sub vi, when it is done, it gets an error 1039. i think its an error having to do with aborting a vi. should i be ignoring this error?

0 Kudos
Message 7 of 10
(3,181 Views)

But you're not aborting the VI, your aborting the sub VI you just started.

 

Still not sure how dynamically calling each other is better then calling a then b in a while loop. In both scenario's both VI's will be in memory.

Message 8 of 10
(3,168 Views)

Did you know that there is a whole Forum devoted to the LabVIEW MakerHub and LINX?  This is their Home Page.

 

Bob Schor

0 Kudos
Message 9 of 10
(3,156 Views)

@Bob_Schor wrote:

Did you know that there is a whole Forum devoted to the LabVIEW MakerHub and LINX?  This is their Home Page.

 

Bob Schor


Yes I do know.

I was reading and found that linx doesn't support the main modules/toolkits I need(usrp and imaq, among others)

Currently looking into pythong integration toolkit for labview 2015+.

0 Kudos
Message 10 of 10
(3,137 Views)