Using IF statement to change the value of a property
I am trying to change the value of a property depending on the value of another property. I have used the code below within a subscription.
if(me.Amplitude = 1) {
me.Condition = "Normal Operation"
}
else if(me.Amplitude = 2) {
me.Condition = "Bearing Fault"
}
else {
me.Condition="Error"
}
When I test the code my Condition property changes to 'Normal Operation' but remains on 'Normal Operation' regardless of the value I assign to Amplitude.
Hope you can help.
Thanks, James

