LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Right way to approach my project.

Well... I think that I'm the only one here that theoretically don't know all differences between local variables and propriety node (value) but... I have a best friend that I  know him since he was...  WebCrawler...now it name is... Google... here  with a simple search... you can see a lot of useful information about this subject that was build over years buy the gentlemen's that continue here his works. In this subject... I'm the only one... greenhorn 🙂

 

Btw... .ini files are wonderful, I don't know if after that the program will be compiled, can be modified at user level... (buy the program). Here can be a starting point to read this and more places to understand .ini files.

0 Kudos
Message 21 of 29
(1,261 Views)

@xipxid wrote:

Thank you RavensFan, something like this ?!

 

working_w_Lv.png

 

Next question, default path, temperature units (Celsius, Kelvin, Fahrenheit) and more settings, will be chosen one time (or more times to test) but on real environment one time at start using the program. I need to make a separate VI let say... "Settings" or a "Tabbed sistem" ? I prefere a separate VI. How can I store all those variables ?! In a global variable ?

 

Best regards, Marcelo


Your Value Change-even has a NewVal output on the left hand cluster, so no Control needed there.
As for multiple variables, i assume you'll do most/all of the work in the consumer loop, so add a system/settings-cluster that loops around in a shift register to handle such things.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 22 of 29
(1,253 Views)

I don't understand "Your Value Change-even has a NewVal output on the left hand cluster, so no Control needed there."

 

I try to delete all one by one... and don't work. Can you explain ?

 

Explain.png

"As for multiple variables, i assume you'll do most/all of the work in the consumer loop, so add a system/settings-cluster that loops around in a shift register to handle such things."

You speak about "Master Cluster" ? I will add them later, for the moment I try to understand how it work Producer / Consumer architecture, after that I will port my original "anarchic / disaster" VI on the Producer / Consumer architecture.

 

 

Thank yo for your attention.

0 Kudos
Message 23 of 29
(1,243 Views)

What Yamaeda meant is that in your event structure in producer loop, at the bottom left of it, there is a NewVal value, which you can use to feed "Data" instead of using "File Path" control.

 

What exactly doesn't work?

 

EDIT:

I suggest you use "Highlight execution" 

AeroSoul_0-1621926023492.png

If you don't know which part of your program is giving you the error.

It slows down the process, so you can follow the wires as they activate.

 

 

EDIT 2:

If you meant the error about wrong data type in variant, then i think you have wrong data type at variant.

AeroSoul_0-1621926326699.png

 

Input data type is path, output is string and it gives me this error. You are probably reading a path, but had another data type somewhere in your VI, but i can't check because i have LV2019.

 

0 Kudos
Message 24 of 29
(1,222 Views)

For you all from here this can be an stupid KISS exercise. For me this are equivalent with Neil Armstrong first step.

 

I understand how it work this sistem, Producer / Consumer (for my purposes !!! ) I don't say that I plenty understand what I make here, I say that I can use it on my project.

 

Well... seems that LabVIEW spend resurse in the wind. The "File Path" have no wire, I understand that it have a Constant, a Local Variable and some values, that mean that I can't delete it. But... it have no wire. What can I do with him ?! I give him some flowers and I'l parking them on one corner ?! I don't see any future implementation for them. I leave it lonely in the "Event Structure" ?

 

ok.png

 

As it saying Yamaeda... "Dumb people repeat old mistakes - smart ones create new ones." Well... I hope that in the future not be so dumb to repeat old mistakes and I'm sure that I'l create new ones... but that not mean that I'm smart...

 

Let see... Producer / Consumer architecture... in my case Producer produce some data and control the UI buttons, File Path, constants, initialization process and so on. This part really will "produce" small amount of data, the truly "producer" for data will be in in the... "Consumer" part of this architecture. This can be a paradox and like any paradox are not easy to understand. This was my stupid problem. The rest... are history...

 

Thank you very much for your attention, thank you very much for your help.

Best regards, Marcelo

0 Kudos
Message 25 of 29
(1,213 Views)

As for the 'left over' path-control, it's often left hanging in its value change event, just like you have it now. 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 26 of 29
(1,211 Views)

I think that I understand how I can use the "Queue" but... I want to understand the "Channel" approach on same vi. Somebody can put the "Channel" function equivalent with top "Queue" part on bottom part of vi ?

 

Thank you in advance, Marcelo

 

PS - LV15, If need another version here I am.

0 Kudos
Message 27 of 29
(1,127 Views)

hello gentlemen's,

 

well, I'll count 30 days and some (much) nights from the moment that I start working on my project from the moment that I start to fight with LabVIEW (I mention for all... I DON'T KNOW LABVIEW !!!), I know... it past more... but I have another work. I make some steps, I start from nothing ( from my anarhic vi... that you know it...) to... this... (first off all thanks to altenbach, was firs that make me the honor to pay attention on my problem, second to BowenM that pay special attention on my problem and give me a... path...) after that... thanks to all that pay some... how how... attention on this subject. this is... until now... hmmm...

 

main_NI_forum_1.png

 

well... this... is where I get so far.

 

I will attach some files and after I reply again, I'll hope that the sistem don't ban me.

 

see you soon and thank you all.

 

best regards, Marcelo

 

 

 

 

 

 

0 Kudos
Message 28 of 29
(1,076 Views)

Hello ladies an gentlemen's,

 

As "one man show" that I am, I work on my job and on free time I fight with my old / new love... LabVIEW. I start this project because I don't know what I need to made this project. Same program was not made until now, no inspiration about how can be approached. Now I have at last a real image about what I need from this program and how can I aproche them but... still need your advise, your opinions. As you see from this snippet (and from zipped files)... something I learn and apply... yet, something I learn and... don't apply... yet... But... my problem still exist. Not old reloaded problems but new ones... not loaded problems. This approach generate many solution to approach my project but in same time generate more problems to this. Seems that respects some "Murphy's laws"...

Overall I can't stop amazing myself about how simply / complicated / powerful / flexible and so on are LabVIEW.

 

First of all I want to thanks to BowenM that show me a possible path for my project and to altenbach that with some time ago it explain to me that is needed to NOT be stupid and not continue with my first "anarchic" vi. Of course I thank you all that give a look here and post yours opinions about this project.

 

My filling is that I'm on right way with this project but... same filling tell me that can be best approached. Let see if I will understand the "best approach" for this project. 

 

main_19_1.png

 

Please don't pay attention to stupid approach for "initialize" part, it can be redesigned with "for loops" to be more simple. Most of "variables initialization" are not needed on the Real Life Run of the program, I put them there because I "Run / Stop" the vi for millions times and the buttons remain in an "strange" states.

 

Back to important things... I adopt the Producer / Consumer architecture as BowenM suggested. I hope that I don't pass on stupid approach of this architecture (it is very possible ). I understand why this architecture name is this (because this architecture produce "States" and consume "States"... even that the data is produced on many other loops. On the logic "if that than that" I suppose that can be more "Producers and Consumers"

 

Now my problems are many... one of them (to exemplify) was the "save Loop", initially I make it functional like this... SaveLoop and DisplayLoop and after that is working ok... well... I encounter a method to simplify them. Seems that is the only way that I can learn... 😞 . You can laugh... because I laugh... now... but... was "sudor, sangre y lagrimas / sweat, blood and tears" until now and will be more. For this reason I say that I will encounter another way to do the initialization part. 

SaveLoop.png   DisplayLoop.png

Now... It working as I expected... on Run vi but... I have some question and the response at this questions can be give only buy an Experienced Programmers !

 

1 - The Producer / Consumer architecture are correctly used or abusive used ?

2 - The Queues functions are correctly used ?

3 - The Channel Wire's are correctly used ?

4 - The Master Cluster are correctly used ? How can I send the information that is stored in the Shift Registry of Master Cluster to another loop / s if I need that ? With Channel Wire ?

5 - I can run various Loops at various / different speed . Can I send data from one to another Loop that run at different speed without change the speed to lowest speed ? With what and how can I make this ?

6 - About SubVi's... Is needed to make every loop as SubVi ? or I need to "identify" blocks that is needed to be made it SubVi ?! For example... Sliders Loop I need to make only one slider "kit" SubVi or the 3 Sliders together on one SubVi ?

7 - I try to make "exe" and "install" things and I need to understand how it working this thing, for example with exe I made it and port it on a laptop, well... not work, I read and I install "LabVIEW runtime environment" and it work but... almost 300 MB to run a half MB of program ??? The "Build Installer" module put on installer all files that is needed to run the program ? It select automatically the needed files that are used to run the program ? Are smaller than "Runtime Environment" ?

8 - As this program until now not exist... almost sure I can't see all necessities for this program, in the future will be a "Collaborative" style program where anybody can add, modify, suggest etc. data for the program purpose but... I want to put the program simulation for free at disposition of potentially collaborators. Is needed a payed version of LabVIEW for this or I can make this with the free version ?!

 

Thank you for attention, Best regards, Marcelo.

 

P.S. - PLEASE PAY ATENTION !!! if you run the program... still make unused some folders and files on temporary directory (I test this function on paste) please manually delete this files and folders.

Download All
0 Kudos
Message 29 of 29
(1,026 Views)