Simple Program - Want to get state of some switches.

For general Flowcode discussion that does not belong in the other sections.
Post Reply
Billduck1302
Posts: 14
http://meble-kuchenne.info.pl
Joined: Fri Dec 06, 2024 4:41 pm
Has thanked: 1 time

Simple Program - Want to get state of some switches.

Post by Billduck1302 »

It does not recognise a Boolean NOT DG. When I fix it, with a space, it reverts to NOTDG, and as such, thinks it is a variable. It sees the same error when I step thru it with F8. I may be asleep at the wheel.
Thanks in advance.
Attachments
7Segment DisplayV1.fcfx
(34.06 KiB) Downloaded 13 times

chipfryer27
Valued Contributor
Posts: 1575
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 356 times
Been thanked: 560 times

Re: Simple Program - Want to get state of some switches.

Post by chipfryer27 »

Hi

Try exclamation mark instead of the word NOT (!) as your operand

Regards

Billduck1302
Posts: 14
Joined: Fri Dec 06, 2024 4:41 pm
Has thanked: 1 time

Re: Simple Program - Want to get state of some switches.

Post by Billduck1302 »

I will add that !(Variable) works but not NOT(Variable)

medelec35
Matrix Staff
Posts: 1955
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 626 times
Been thanked: 656 times

Re: Simple Program - Want to get state of some switches.

Post by medelec35 »

Hello.
If comparing variables, you need to use logical operators and not bitwise operators.
E.g
&& instead of & (or AND)
|| instead of | (or OR)
Note the pipe | is the key next to Z.
! instead of NOT as Chipfryer27 stated
Martin

Post Reply