Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I get the souce code of a labview vi .

Hi

How can I get the source code of a labviw vi.

Mal
0 Kudos
Message 1 of 6
(9,156 Views)
<>

The source code of a vi is the graphical code of the diagram. You can view the code by "show block diagram", or print that by selcting print from the file menu.

If you mean by the source code the equivalent (C/C++ text code, or actually any other text code behind the graphical code), it is not possibe to retrieve that. This is NI stuff.
0 Kudos
Message 2 of 6
(9,156 Views)
Is the "source code" need to be written by the program developer or just doing the PANEL and BLOCK DIAGRAM sufficent? I have been trying to get a ready-made labview program to run a STEPPER motor. I have been to numerous sites but have not been successful. Can you sent me such a program?
0 Kudos
Message 3 of 6
(9,140 Views)
The LabVIEW block diagram is the source code.
It is compiled through the LabVIEW environment into a format suitable for running.
It does not go through an interim conversion to another language before it gets compiled, so
there is no other source code. The actual vi breaks down into 4 parts :

Front panel
Block diagram
Code (diagram compiled to machine code)
Data (control and indicator values, default data, diagram constant data, and so on)

Thanks

Sacha Emery
National Instruments (UK)
// it takes almost no time to rate an answer Smiley Wink
Message 4 of 6
(9,119 Views)
I have a simple VI for moving a STEPPER MOTOR. I have attached the VI. It does not work. Is something wrong with the program?
0 Kudos
Message 5 of 6
(9,089 Views)

@labview1958 wrote:
Is something wrong with the program?

Yes, everything is wrong! Who wrote it?

 

  • There is no toplevel while loop, the enum only gets read once at the start of the program and never again. In each of the cases, The FOR loop will run 100k times without any way to stop it. For example, each iteration of the "Motor down" case will take >150ms, so you do the math how long it will take overall to finish the loop :o. There is way too much duplicate code. The four IO calls differ only by one input (8,9, A, B), that should give you some idea how to consolidate everything into a simple state machine. Have you looked at working stepper motor examples?
0 Kudos
Message 6 of 6
(7,927 Views)