LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Spawn a process in Labview 7.1

Thanks rolf,

That's helped clear it up a little more for me.  Sorry for the presistent questions, but here's another one......

If the EXE isn't capable of compiling doce, does this mean that an EXE cannot load a VI dynamically which was saved on an "incompatible" machine?  This is something I always thought was possible.  Not that I've ever had to or even tried to do this, but I thought it was possible to (for example) compile an EXE on a Windows maching (X86 architecture) and then copy a VI from a mac environment (not containing any OS specific calls of course) to be dynamically loaded by the EXE.

Your explanation rules this out.  I'm not saying this is of any real practical importance to me at the moment, but it's something I'm curious about. (Meeow, THUD!)

Can someone confirm this?  This truly surprises me as I thought the "platform independence" of LV would at least extend that far.

Does this mean that on a Linux box, any VIs to be loaded dynamically must be saved on a hardware-compatible machine?

Just a Q, as Linux will surely gain in importance in the future.....

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 21 of 49
(2,523 Views)

Hello Stanislav,

Thank you for the reply.  I visited your website and it looks interesting, your product offers many values we may be interested in here at Miradia.

I would be interested in finding out more about implementing your LabHSM here.

 

Thanx,

J. Karl Meinhardt

Sr Opto-Electronic Test Engineer

http://www.miradia.com/

0 Kudos
Message 22 of 49
(2,493 Views)
Thank you, J. Karl!
 
I hope my answer contributed into the whole picture of the issue you were interested in.
 
As far as LabHSM goes, I will be happy to provide any extra info you need. You are more than welcome to contact me via, say, email you can find on the site's Contact page at http://www.labhsm.com/contact.htm
 
Stanislav Rumega, CLA
 
LabHSM toolkit - Design is code!
0 Kudos
Message 23 of 49
(2,487 Views)


@shoneill wrote:
Thanks rolf,

That's helped clear it up a little more for me.  Sorry for the presistent questions, but here's another one......

If the EXE isn't capable of compiling doce, does this mean that an EXE cannot load a VI dynamically which was saved on an "incompatible" machine?  This is something I always thought was possible.  Not that I've ever had to or even tried to do this, but I thought it was possible to (for example) compile an EXE on a Windows maching (X86 architecture) and then copy a VI from a mac environment (not containing any OS specific calls of course) to be dynamically loaded by the EXE.

Your explanation rules this out.  I'm not saying this is of any real practical importance to me at the moment, but it's something I'm curious about. (Meeow, THUD!)

Can someone confirm this?  This truly surprises me as I thought the "platform independence" of LV would at least extend that far.

Does this mean that on a Linux box, any VIs to be loaded dynamically must be saved on a hardware-compatible machine?

Just a Q, as Linux will surely gain in importance in the future.....

Shane.


Yes, a runtime system can only load VIs saved in the same LabVIEW version (except minor VI version difference) and on the same architecture. A runtime system on Linux while being x86 based can NOT run a Windows compiled VI. Platform independance of LabVIEW is broad and almost unpreceded but not down to the binary level, as the compiled code is not byte code as in Java or Python for instance, but directly real machine code instructions. Including the compilers and intelligence a LabVIEW development environment in the runtime would:

1) Bloat the runtime engine considerably
2) Possibly create difficulties in that for certain recompilations user interaction may be required in one form of the other such that sooner or later part of the editor would have to be included in the runtime system too.
3) Reduce one more incentive to use the development system for quite some circumstances

Just try it out and you will see the error message when trying to load a Linux VI into a Windows runtime system.

Rolf Kalbermatter


Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 24 of 49
(2,534 Views)
Thanks again Rolf,

especially for having patience with me to answer my questions.  I'm pretty clear on how it works now.  I've been taught that I've held false views on tha nature of VIs and LabVIEWs platform independence for some time now.  Thanks for helping clear it up for me.

It seems as though I had a fundamentally flawed idea about what a VI IS.  The fact that a VI contains anything compiled is new to me.  Don't ask where I got the idea that there was NO compiled stuff in there, I can't remember myself.

There's always the chance that some time in the future your answers will solve many headaches in advance.

I suppose the catah is that the VIs even include binary code.  Of course as soon as compiled code is included, then platform dependence is given.  The crux was that my previous idea was that everything was compiled at run time.

Thanks again, You've earned the stars (many times over)

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 25 of 49
(2,534 Views)


@Philip C. wrote:

...Yes, the Runtine Engine is compiling the VI before running...


NOTICE!!! The above statement is WRONG! The LabVIEW Runtime Engine does NOT have the power to compile a block diagram, but can only run an already compiled code.

Sorry for the misinformation!
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
Message 26 of 49
(2,481 Views)
Hi Rolf,

Thanks for clearing out this question!

It's absolutely correct that a VI is stored in four different parts:
  • front panel
  • block diagram
  • compiled code
  • data space
The LabVIEW Runtime Engine is, through VI Server calls, able to run a VI's compiled code and also using the front panel and data space. The Runtime Engine can't use the block diagram for anything, since it can't compile it.

Here's a great way to demonstrate that the compiled code actually exists:
  • Create a runnable VI and save it.
  • Click Ctrl+i and go to Go to "VI Properties » Memory Usage".
  • Notice the four different parts mentioned above. Notice the size of the "Code".
  • Make the VI non-executable by breaking the code - e.g. delete a necessary wire. Save the VI.
  • Notice that the size of the "Code" now is practically 0 (most likely 0.2 KB) - this is because the VI couldn't be compiled and therefore no compiled code was saved.


I hope that this makes it easier to understand what goes on behind the scenes.

Have fun!

Message Edited by Philip C. on 07-13-2005 12:28 AM

- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
Message 27 of 49
(2,522 Views)
Thanks for answering my questions guys, and I apologise for pulling this thread off-topic.

Nice example Philip.

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 28 of 49
(2,516 Views)

@shoneill wrote:
... I apologise for pulling this thread off-topic.

Hi Shane,

Do not apologize for the way this thread turned out - on the contrary, it made me (and even some LabVIEW developers) question our presumptions on when and how the compiler works.

This discussion has also made me look into the possibility of creating an in-depth document that describes exactly what goes on behind the scenes when a VI is being build and compiled, and how the execution is performed.

I really enjoyed investigating this topic, thanks!

- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
Message 29 of 49
(2,504 Views)
Philip,

as soon as the document is finished, I'd love to read it.

I think it IS an area which could be documented better so that we have a better idea how things operate.  Not everyone knows as much as Rolf.

I do believe this was also requested for answering by the LV developers if I'm not mistaken.....

Thanks.

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 30 of 49
(2,504 Views)