LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

question about Val(Sgnl) property

Solved!
Go to solution

unfortunately this plan did not pan out...I used the /= like we discussed, but the history indicator still wasn't lighting.  I hooked up probes to the Old Value and New Value parameters of the event structure.  They change from false to true as the value of the binary input from the FPGA comes in...but they change at the same time.  In other words Old Value and New Value always match each other.  How can this be?

0 Kudos
Message 11 of 20
(907 Views)

I think we are going to have to see the entire VI that you have and any SubVIs you've created that are a apart of your project. Pictures can only tell us so much, but if we get your code, we can probably pinpoint the problem(s) that your having.

0 Kudos
Message 12 of 20
(905 Views)

Hi Bmishoe,

 

It looks to me as though the old and new value are the same because you are also writing to the indicator directly - there's something of a race condition here because both the property node and indicator are being set by a branched wire, but since property nodes take a bit longer to execute I'm betting the direct wire to the control indicator wins out 99.9% of the time.

 

What I think is happening:

 

-new value comes in

-indicator gets set to new value

-property node also sets new value, (identical) value just sent to indicator is now the "old" value

-event structure sees two identical values.

 

You probably just need to remove the direct connection to the indicator.

 

Regards,

Tom L.
Message 13 of 20
(898 Views)

But where would I make the connection?  I was under the impression that you had to write to the Val(Sgnl) property of an indicator if you want to use said indicator in an event structure.  So don't I need to write to that property each time I write to the indicator itself?

0 Kudos
Message 14 of 20
(891 Views)

Hi Bmishoe,

 

That is correct (when using indicators), my suggestion was that you don't write to the indicator, just the val(signaling) property.  This will set the indicator value and trigger your event.  The indicator doesn't need to be wired at all.

 

Regards,

Tom L.
Message 15 of 20
(883 Views)

@bmishoe wrote:

But where would I make the connection?  I was under the impression that you had to write to the Val(Sgnl) property of an indicator if you want to use said indicator in an event structure.  So don't I need to write to that property each time I write to the indicator itself?


By writing to that property, you are also writing to the control.  By writing to the control itself also, you are writing to it twice.  The explanation for the old and new values being the same is because by the time the Val(Sgnl) event is fired, the direct write to the control has already overwritten the data, so what is new is old again.  😉

That's my take on the explanation anyway.  🙂

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.
Message 16 of 20
(879 Views)

OK, you guys have been so much help, and this largely fixed my problem...BUT...it exposed something else that's related to what an originaly reply noted about how the value change structure is triggered just by the reference being written to, regardless of whether the value changed or not.

 

It would be difficult to explain here because it involves the conditions under which the FPGA sends me the value of the address, but anyway...what will fix it is a way for me to able to only write to the Val(Sngl) property *if* the value is different than it was the last time that address was read...is there a way to do this?  What I need is like a buffer that can store the previous update...can't really picture how to do that right now... Again it's a long, complex reason as to why..

 

Thanks for all the help you've been.

0 Kudos
Message 17 of 20
(864 Views)
Solution
Accepted by topic author bmishoe

A feedback node.  Feed the wire into that.  Then you will have the value from the previous iteration as well as the current iteration to compare.

Message 18 of 20
(860 Views)

Perfect!  It looks like it's all working now....thank you all so much!

0 Kudos
Message 19 of 20
(841 Views)

Excellent!  🙂

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 20 of 20
(836 Views)