Page 1 of 1
Output trigger not working as expected.
Posted:
Sat Jan 15, 2022 5:18 am
by Delco
I am having a issue with the output triggers .
I have a button wired to port1 pin16 and a solonoid wired to port3 pin12
Now if I set port1 pin16 to be activated by led 97 (port3pin12 status ) it works perfectly locks solonoid on while button is pressed.
NOW if I add a second condition to turn that same output pin port 1 pin 16 on like led52(miston) then the solonoid cycles at a fast rate but wont turn on fully . now if I press the button once this extra trigger has been added then the button also causes the same cycling of the solonoid.
All I want to do is either turn a solonoid on manually OR turn it on with mist button
IF I Delete the second condition it works fine again .
screenshot added
Re: Output trigger not working as expected.
Posted:
Sat Jan 15, 2022 6:41 am
by Delco
I wrote that wrong " I have a button wired to port1 pin16 and a solonoid wired to port3 pin12 "
Should be I have a button wired to port3 pin12 and a solonoid wired to port1 pin16
Re: Output trigger not working as expected.
Posted:
Sat Jan 15, 2022 11:04 am
by cncdrive
What you doing will not work, because you trying to define the state of the output from 2 LEDs.
What will happen in this case is that the UCCNC is going through the output trigget table one by one, so it first checks the state of the first statement, the first LED number and outputting that to pin 16. then it checks the other LED number and outputs that to pin 16.
If the state of the 2 LEDs are not the same, one LED is on one if off will cause the output to toggle in a cycle.
I'm not sure what you exactly want to achive?
But if you want to put the the LEDs into somekind of logic connection and output that to an output pin then you can use a macroloop and code the logic connection in that macro.
I mean e.g. an "OR" or "AND or "XOR" etc. logic connection between the 2 LEDs to drive the output pin.
Re: Output trigger not working as expected.
Posted:
Sat Jan 15, 2022 9:33 pm
by Delco
What I was trying to achieve was having a atc solonoid clamp via a manual button input ( also a release but that doesnt need any other conditions ) or via spindle fwd ( testing with mist first ) .
But as you say it does not work , will have to look at a macro loop to start the atc clamp on startup .
I just assumed that if condition1 led or condition 2 led was met in the output logic it would have worked.
Re: Output trigger not working as expected.
Posted:
Sat Jan 15, 2022 9:33 pm
by Delco
What I was trying to achieve was having a atc solonoid clamp via a manual button input ( also a release but that doesnt need any other conditions ) or via spindle fwd ( testing with mist first ) .
But as you say it does not work , will have to look at a macro loop to start the atc clamp on startup .
I just assumed that if condition1 led or condition 2 led was met in the output logic it would have worked.
Re: Output trigger not working as expected.
Posted:
Sat Jan 15, 2022 11:25 pm
by cncdrive
It is basically an OR gate because 00 input gives 0 output and 11 input gives 1 output, but 01 and 10 input gives a glitch on the output, because 01 input makes a 01 switching of the output while 10 input gives a 10 switching sequency on the output.
This is because the statements in the output trigger are made one by one in a sequence.
In a macroloop you could easily code an AND gate, just read both LEDs and make an if checking with the && operator.