LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Right way to approach my project.


@BowenM wrote:

 

 

 


demo.png

 

xipxid ,

this is just a demo to show how to transfer data from one loop to another via a (named) queue

 

1# Run the vi

2# switch to page 2

3# (repeatedly) click on the dummy control

0 Kudos
Message 11 of 29
(990 Views)

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.

0 Kudos
Message 12 of 29
(983 Views)

Hello,

 

I fight with a simple thing, I fight with an error and I don't know from where is coming.

Error.JPG

 

Somebody please can iluminate me ?!

 

Thank you in advance, Marcelo

Download All
0 Kudos
Message 13 of 29
(900 Views)

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.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 14 of 29
(885 Views)

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.

working.png

 

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

 

0 Kudos
Message 15 of 29
(878 Views)

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.

0 Kudos
Message 16 of 29
(873 Views)

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

0 Kudos
Message 17 of 29
(869 Views)

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.

0 Kudos
Message 18 of 29
(852 Views)

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

0 Kudos
Message 19 of 29
(848 Views)

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)

0 Kudos
Message 20 of 29
(840 Views)