05-04-2021 05:08 PM - edited 05-04-2021 05:13 PM
05-04-2021 05:49 PM
well... sir... how it's saying here in Spain... "Este son palabras mayores..." , this are a big words. This are science and experience.
Let see if I can use them.
Thank you very much for another 20 minutes.
05-22-2021 08:25 PM
Hello,
I fight with a simple thing, I fight with an error and I don't know from where is coming.
Somebody please can iluminate me ?!
Thank you in advance, Marcelo
05-23-2021 09:15 AM
You have an extra enqueue, where you enqueue nothing for your variant. When you do the dequeue, it dequeues the "nothing" and you get the error. Meanwhile, the data you wanted is still waiting to be dequeued.
05-23-2021 10:51 AM
Thank you very much billko for your attention, I take The BowenM example as template... and loose some days to understand what NOT function... Well... seems that this is a good starting point to "right approach" the "Initialize" part that I can use it when the program starts and "LoadFile" - load new file / files after that the program start.
The important things is that I start to understand how I need to think at "macro level" this project, the Producer / Consumer architecture is a "must have" in place of my old approach.
I don't like this two local variables but I have no ideea with what I can change them.
Any Ideea are most that welcomed.
Best regards, Marcelo
05-23-2021 11:43 AM
Move the File path terminal from the flat sequence structure to the File Path Value change event. Because the flat sequence only runs once and the event case could run multiple times, the speed advantage from using the terminal is more beneficial in the event case. Note, that since you really don't change file path very often anyway, it really doesn't matter.
Note: You could also eliminate the local variable in the event case and get the data from the NewVal node.
You don't need the File Path local in the consumer loop at all. You can wire a file path constant into the Variant to Data. That input is used to define the type of data coming out. The actual value of the file path will come from the variant that you just dequeued.
05-23-2021 12:24 PM
Thank you RavensFan, something like this ?!
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
05-24-2021 02:08 AM
While we are on topic of local variables and property nodes, what is the difference between local variables and Property Node (value)?
I read that property nodes are slower, is there anything else?
I usually only use Property Node (value signaling) when i need an event update.
05-24-2021 03:24 AM
Well... I'm the worst guy here to ask theory connected with LabVIEW... I don't know LabVIEW, I jus need it and love it, it is an amazing program that tolerate included one like me... and are... "user friendly..."
For me it is enough that I read about that the "Local Variables" should / must be avoided, it is enough for me for the moment. I don't plan to be a superhero in the LabVIEW programming, here are enough deserved superheroes in LabVIEW programming that has spend an entire life to learn and help another to learn LabVIEW.
Lucky for me and an real honor that someone like altenbach or billko or RavensFan or Crossrulz or.. even you and others pay attention on this subject.
Best regards, Marcelo
PS - to store my settings parameters... I can store it in a simple .txt or .csv file... and load the file on starting program, this can be the simplest way I think
05-24-2021 04:08 AM
It was more of a general question for anyone to answer 🙂
If you want to have some settings loaded when you start the program, then yes, you need a file with those settings (unless you plan to hardcode them).
I'd go for either .txt file or .ini file, depending on the scope of the settings.
(INI files are great, because you can have default values set when reading them)