Output trigger not working as expected.

If you think you've found a bug post it here.

Output trigger not working as expected.

Postby Delco » Sat Jan 15, 2022 5:18 am

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
Attachments
output issue.png
Delco
 
Posts: 364
Joined: Tue Apr 02, 2019 4:23 am

Re: Output trigger not working as expected.

Postby Delco » Sat Jan 15, 2022 6:41 am

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
Delco
 
Posts: 364
Joined: Tue Apr 02, 2019 4:23 am

Re: Output trigger not working as expected.

Postby cncdrive » Sat Jan 15, 2022 11:04 am

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.
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: Output trigger not working as expected.

Postby Delco » Sat Jan 15, 2022 9:33 pm

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.
Delco
 
Posts: 364
Joined: Tue Apr 02, 2019 4:23 am

Re: Output trigger not working as expected.

Postby Delco » Sat Jan 15, 2022 9:33 pm

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.
Delco
 
Posts: 364
Joined: Tue Apr 02, 2019 4:23 am

Re: Output trigger not working as expected.

Postby cncdrive » Sat Jan 15, 2022 11:25 pm

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.
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm


Return to Report a bug

Who is online

Users browsing this forum: No registered users and 6 guests