02-29-2016 09:11 AM
But concerning this one, I din't properly understand how to initialize values without any actions from user.
To be more clear, I want that once VI starts, the values X, Y, Z take values of X0, Y0, Z0 respectivel
I do not focus in your problem but about what you say in above i made this vi for you
check it and tell me if it is what you point to solve
02-29-2016 09:24 AM
Hatef,
Thanks for VI.
Frankly speaking, I didn't properly understand how your solution matches my setup.
In my task there were 3 key points:
02-29-2016 10:18 AM
There is no such thing as "it is always better". Try using "it is almost always better".
02-29-2016 10:19 AM - edited 02-29-2016 10:22 AM
pavel this vi want to show you how you can how to initialize values without any actions from user. for example if your start xzy is one of x0 z0 or y0 value in this vi the related frame will be initialize
02-29-2016 10:37 AM - edited 02-29-2016 10:38 AM
@paul_cardinale wrote:There is no such thing as "it is always better". Try using "it is almost always better".
I started off with that, but in this case the sequence structure served no purpose and with the exception of very few cases (e.g. for sequencing on FPGA, benchmarking) they shouldn't be in code (they are misused so much more than they are used effectively) so I decided to leave it as a hyperbole. I did also just say I 'discourage' it's use.
02-29-2016 10:48 AM
Sure; it's often good advice to avoid things that tend to be misused. However it can sometimes lead people astray.
Many times I have seen things badly coded (sometimes very badly contorted code) because someone was strictly adhereing to a "Never do X" rule.
02-29-2016 11:04 AM
Yeah I would keep this much simpler, no need for events.
Just use a sequence frame or similar with a dataflow item out to the start of your application. Using a single frame and dataflow can avoid some of the overuse issues that concerned some posters. Or this can become the first state of a state machine but seeing as you already have this structure.
This is from one of my applications where I needed this easily and the main application didn't need a state machine.
Either way I would scrap the events, it is much more confusing to read the code and is unclear what your intention is if your not around to explain it