Hi,
I wish to compare two Byte values in a Calculation Component and a True/False being saved to a variable.
I dont think we have a comparitor style term like ==
My brain has gone blank! A little nudge anyone.
MyVar = ( 0xFC == Value)
If I did a bit wise AND, would I not get a value back based on any bits that match?
Thanks in advance.
P.S. I was avoidig using a series of Decision boxes as it was becoming very unwieldly!
Comparing Two Values in a Calculation Component.
-
jay_dee
- Posts: 257
- http://meble-kuchenne.info.pl
- Joined: Sun Dec 20, 2020 6:06 pm
- Has thanked: 101 times
- Been thanked: 72 times
-
mnfisher
- Valued Contributor
- Posts: 2183
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 177 times
- Been thanked: 1024 times
Re: Comparing Two Values in a Calculation Component.
You can use '=='
So .x = (.y == .z) will set .x to true if .y equals .x (also < > <= >=)
Martin
So .x = (.y == .z) will set .x to true if .y equals .x (also < > <= >=)
Martin
Re: Comparing Two Values in a Calculation Component.
Sorry..my bad. Thanks Martin!!
I must have keyboard thump'd wrong.
The expression is now being accepted.
Ctrl_Side = (CAN_RxData_A[0]==0xFF)
Friday Code is much like a Friday built car.... never the best!
I must have keyboard thump'd wrong.
The expression is now being accepted.
Ctrl_Side = (CAN_RxData_A[0]==0xFF)
Friday Code is much like a Friday built car.... never the best!