LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is possible to import controls, operators and indicators from a file? (for ejample *.CSV)

Solved!
Go to solution

Is possible to program a VI from some type of file automatically? (.CSV for example).

The general purpose is to import information from electrical schematics.

Is there any better method for this purpose?
Is possible to create programming objects automatically within a vi from a file?
Vi can be created from another VI automatically by importing a file?

I attached a sample diagram image.
Thanks.

0 Kudos
Message 1 of 5
(2,250 Views)
You cannot create code programatically. If you want to create electrical schematic (as shown in the image) what you can do is try to make all the possible schematics seperately and keep it as a library and you can call them through program by reading from a file.
-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 5
(2,242 Views)
Solution
Accepted by topic author Felipevv
0 Kudos
Message 3 of 5
(2,222 Views)

In post #12 of this thread I commented on the Idea of creating controls on the fly

 

 

 

 

 

 

(Artwork courtesy of Christian Altenbach)

 

And include a link to where I posted this code

 

 

Which was part of a community project to help us manage emoticons for use in posting to this site (I still use this on my home machine).

 

As it stands now it will read in a set of images as defined by a configurtion file and populate the Picture Control with images of the emoticons. If you click on any of them, it will figure out what emoticon you clicked and copy the URL of the emoticon into you clipboard so you can paste it into the dialog for inserting images on this forum.

 

So it has the following abilities;

File driven set of images

Asssociation of image with info

Abilisty to import new

Automatically fits the controls to the picture.

 

Now don't dismiss this off-hand because it uses emoticons. The image can be anything you want. Using the image you get from an "invoke node >>>Get image" will work fine and can save you a lot of work since you do not have to code up the functionality of the control.

 

Now if you can limit the types of controls to a fixed set you can get another advantage to help you "make the controls work" by doing the following.

 

1) Mouse down picture .... find associated control type

2) Use off-screen hidden control of that type and move it to where the image is in the picture (over top of the picture) and make it visable and give it key focus.

3) Let user interact with the real LV control that is over-top of the image.

4) On enter or mouse leave of the control, get the new image, stuf it in the picture... hide the control that was previously hidden.

 

I can not leave this topic without again saying that "Controls on the Fly" application carry a large development effort to get them to work correctly.

 

Here is an image of one of my extreme versions of Controls on the Fly developed explicitly for touch panle interfaces (there are two shown, in this image)

 

OnTHeFly.PNG

 

Have fun!

 

Ben

 

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 5
(2,205 Views)

Re:

 

 

What I should have mentioned is the above was developed using LVOOP so I can add new controls to the application "On the Fly" by adding additional LVOOP objects to the folder where the exe lives.

 

I suggest anyone else approaching a challenge like this seriously concider using LVOOP since there are many shared opeartions for controls that can be realized by inheriting from the parent class.

 

Ben

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 5
(2,200 Views)