[Solved] Cannot set output of FLIPFLOP using data and clock inputs

More
31 Jul 2023 15:53 - 31 Jul 2023 15:55 #276642 by DauntlessA
Solved, the issue was indeed something very silly.

If you're in auto mode in Probe_Basic and use the GUI buttons to change the coordinate system, Probe_Basic changes to MDI mode, applies the command and then changes back to auto mode (I did know that but overlooked the effect it would have here). This does mean that the data input is low when the clock input goes high, and then the data input goes high again. Of course this happens very quickly so you can't see it in Halshow (but would have been visible with Halscope). If I'd called 'G54' in a program from a different coordinate system it always would have worked.

The final hurdle I had to sort with this was to extend the data input on the flipflop, because if M30 at the end of a program changes the coordinate system to G54 (which is what I was really interested in detecting), the data input goes low (because the machine has left auto mode at the end of the program) before my hal logic has a chance to send the clock input high.

I sorted this by adding oneshot that triggers on the falling edge of is_auto_mode, and connected it with OR to is_auto_mode, and used this as the flipflop data input.
This also turns out to 'fix' the behaviour with the GUI buttons as well, although I probably will change the logic now to 'is_program_running' so that I don't get the message using the GUI buttons and only when coordinate system is changed by a running program.

Thanks so much for the help!
Last edit: 31 Jul 2023 15:55 by DauntlessA.
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

Time to create page: 0.062 seconds
Powered by Kunena Forum