LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I would like to generate text code in LV langage but it's a graphical langage. How can I do?

I wish to generate source code in LV. (This code will be generated starting from operations chosen by the user) My problem is that LV is an exclusively graphic language and that one cannot generate graphs...
Did one access with the code hidden behind these drawing?
I intended to speak about LuaView, a language script based on is Lua.
Is it a realizable solution for my project?
0 Kudos
Message 1 of 7
(2,732 Views)
Hi Sassy,

Can you provide more details about what you wish to do?

Have you heard about LabWindows-CVI?

What development package are you using? Is it strictly LabView or is it NI Developer Suite?

-JLV-
Message 2 of 7
(2,718 Views)
LabVIEW scripting is currently unsupported by NI for the general public but some of the hooks for doing it are already present. There is a discussion forum at /A> where you can find information on what's been discovered so far.
0 Kudos
Message 3 of 7
(2,701 Views)
Corrected link

LabVIEW scripting is currently unsupported by NI for the general public but some of the hooks for doing it are already present. There is a discussion forum at Lava where you can find information on what's been discovered so far.
Message 4 of 7
(2,699 Views)
The user of the program that I must develop must create sequences of operations (from images representing a process). The user can create loops (while, for...) and control strucures (if, else...).
It operates the buttons, valves, switches... present on the drawings.
Behind that, I must generate source code corresponding to the operations choosen by the user (ex: to put button 1 = ONE).
The goal is to memorize these sequences of operations. For that I must be able to generate text, but LV is a graphic language...
My program being written in LV and my diagrams being created in LV, I would like that my generated code is it too. For that it is necessary that I find the code (text) which hides behind LV.
I work with LV 7.1.
In advance, thank you
0 Kudos
Message 5 of 7
(2,700 Views)
hello sassi,

you can do all this by programming your own interpreter...

1) First you have to define commands/events the user may use as programming steps.
2) Let your user do the programming and save the input as text (or whatever is suitable).
3) run a state machine, which interprets the user input and runs all the desired program steps.

It's like "writing" (drawing in LabView) your own BASIC interpreter.
It's maybe hard to program all this, but if you catch the system it's easy to maintain and expand 🙂

Best regards,
GerdW
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 7
(2,690 Views)
There really is no text code that hides behind LabVIEW. The scripting features that have been discovered are ActiveX properties and methods that allow you to create controls, structures, etc. In theory, you could take a text file and use that to create a LabVIEW program. Certain tools from NI (such a Vision Builder) dynamically create VIs now, but like I said, NI hasn't documented the process for us regular users. When it will be officially supported is anyone's guess.
0 Kudos
Message 7 of 7
(2,687 Views)