From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
03-04-2016 10:51 AM
Hello,
Upon VI start undesired action occurs - value Polarization[i] is memorized in flip-flop (please, see the screenshot below).
Does exist some tecjnique, that allow to desactivate a connection (red cross on screenshot) during some instants upon VI start.
Thanks in advance
Pavel
Solved! Go to Solution.
03-04-2016 11:03 AM - edited 03-04-2016 11:05 AM
You can't disable a connection, but you can change the data depending on circumstances. There's a function called "First Call?" that you can use to manipulate that boolean. Maybe you want to value to be False if First Call? is true? Then put an operation like: If True and First Call Not True.
You should also initialize that value in front of the loop anyways. If you set the initial value to "Inf", the Greater Than operator will always be false, right?
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
03-04-2016 11:21 AM
Thanks James,
Thanks.
I've tried your suggestion - unfortunately flip-flop still actions due to a "glitch" upon VI start.
03-04-2016 11:25 AM
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
03-04-2016 11:38 AM
I've added 2nd condition (on comparator input), also added default value on SR.
Unfortunately problem persits
03-04-2016 11:43 AM
Well you're setting a default value of Zero to be graphed when first call... so you're going to see a value of zero on your graph. If you don't want to graph on first call, put a case strcture around your indicator terminal so that it is only written to when First Call is False.
Your Select function with the First Call value as the input and boolean as the output is redundant. Use a Not operator if you want to negate the value.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
03-04-2016 11:58 AM
@James.M wrote:Well you're setting a default value of Zero to be graphed when first call... so you're going to see a value of zero on your graph. If you don't want to graph on first call, put a case strcture around your indicator terminal so that it is only written to when First Call is False.
Your Select function with the First Call value as the input and boolean as the output is redundant. Use a Not operator if you want to negate the value.
I changed employment of the "First Call" according to your concept.
Concerning indicator, it isn't so important, the most important - prevent flip-flop memorize the value when VI starts as it's dramatically changes algorithm functionnality
03-04-2016 12:09 PM
So what's your problem still? Do you need to put a case structure around that VI for the first call?
Pavel, remember, you have all of the tools you need to solve your problem. I think you're really lacking in the fundamental understand of how LabVIEW functions and its abilities. I've told you this before: I highly suggest you watch some free tutorials to better get your bearing.
"Give me six hours to chop down a tree and I will spend the first four sharpening the axe." - Abraham Lincoln
Here are some free training tools primarily focused on LabVIEW and NI hardware to help get started.
-MyRIO Project Essentials Guide (lots of good simple circuits with links to youtube demonstrations)
Learn NI Training Resource Videos
6 Hour LabVIEW Introduction
Self Paced training for students
Self Paced training beginner to advanced, SSP Required
LabVIEW Wiki on Training
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
03-04-2016 12:35 PM
Well, here is the solution that works.
Thanks.
03-04-2016 12:41 PM - edited 03-04-2016 12:56 PM
What the heck....? You're adding "i" to itself exponentially and comparing that to 100... So every time, your code is going to look like this:
0 + 0 = 0 < 100
0 + 1 = 1 < 100
1 + 2 = 3 < 100
3 + 3 = 6 < 100
6 + 4 = 10 < 100
10 + 5 = 15 < 100
15 + 6 = 21 < 100
21 + 7 = 28 < 100
28 + 8 = 36 < 100
...
91 + 14 = 105 > 100
This is rediculously round-about. If this reeeaaally works for you, just set the logic to "AND i > 13"
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'