Machsupport Forum
Mach Discussion => Brains Development => Topic started by: damo green on September 01, 2017, 11:01:34 PM
-
| INPUT#1 0/:1 | -------| COMPARE =1 | when I toggle the physical switch, I can watch the brain and see the input rung color & value toggle accordingly between 0 & 1 , bu the COMPARE rung will never toggle even though the input matches "1"
I also tried with | COMPARE >0| , also does not work, just like above. I suspect it is because it is boolean and 1/0 does not represent true/false exactly ?...but can not input "true" into the compare field…
---------
I found a workaround by comparing and LED set to "1" to the input and that did work…..which was a workaround in itself because trying to set an Input to be a local variable causes Mach3 to hang…..
Would like to be able to write the brain without having to edit a screenset and set an led to "1" as a crazy workaround...
-
I think you're using the wrong compare 'function'.
-If you want to pass the value of a single switch directly you simply use 'no operation' instead of 'compare'. (Or no operation -> invert)
-If you want to 'compare' two inputs then you use one line per input. On each line you add 'no operation' right after your 'input' (same as above). DO NOT TERMINATE ANY LINE. The 'trick' is that you then select (click) both 'no operation' boxes (both will be green) and then hit the '+' button. TaDa!!! You will then see a popup where you can choose 'compare a b' or use boolean logic (and, or ,eor...)
-
The question the op asked if it is possible to compare a signal of input i believe, if it's high or low. I also need to do that, anyone ?
-
I did get it to work, I have to look at what I did later, I have not looked at it lately, so it is hard to remember.
I do remember that the solution was not to try to compare the initial input boxes directly, but first had to pass into into "another box"...i'll try to look at it later and me more accurate with my wording as I can't remember off the top of my head. I did get it working though.
-
I see, i have a complex brain that i need to write for a door guard, but it requires this.
-
I do remember it was very simple, my initial problem was that you can not directly compare a physical input with a boolean, i had to first pass that physical (switch( input into another box and THEN do a boolean compare on that......at the moment i cannot recall what "box"/node i had to pass it into...but it was simple. It was my first brain that is why i can not remember.
It did work to repeatedly pickup the start of a multiple pass/depth threading cycle. At some point I will post a video of it working.
-
Could you just check this boolean issue for me? It will help me a lot
-
bump
-
(https://scontent-dft4-2.xx.fbcdn.net/v/t31.0-8/25395065_10155851310872226_1158760179820359972_o.jpg?oh=0ad1a5d1557e233e6b9d0bfbd0e2792a&oe=5AC6652E)
-
Hi,
thats boolean locic:
Thomas
-
So you got yourself a comparing LED ?
-
So you got yourself a comparing LED ?
what do you want to do ?
-
-deleted- for now