Odd user button issue

Moderators: TomKerekes, dynomotion

Post Reply
Moray
Posts: 288
Joined: Thu Apr 26, 2018 10:16 pm

Odd user button issue

Post by Moray » Tue Apr 30, 2019 5:48 pm

I'm not entirely sure this is a bug, but I've got an issue with the custom screen I modded for my lathe running a KFlop/Kanalog combo.

I've used one of the user buttons (IDC_But8 to be precise) for controlling the coolant pump. The user button setting in Tool Setup is set to do nothing, and via the screen editor, it's set to toggle bit 155.

However, when I try clicking the button, it triggers an e-stop due to failing my toolchanger OK test as part of my e-stop monitoring loop (the TC is controlled by a PLC via Modbus, with a TCOK signal from the PLC to Kanalog to say the toolchanger is on position and locked, and a TCALLOW signal from the Kanalog to the PLC to tell the PLC it's ok to move - if TCOK goes low when TCALLOW is low, then an e-stop gets triggered).
I have tried setting the button action to do nothing in the screen editor, but the fault still occurs.

My initial thought was some kind of bit conflict, but I can't find anything.
TCOK is bit 141, TCALLOW bit 144, and coolant bit 155.
Attachments
GCodeConfigCNC.txt
(22.59 KiB) Downloaded 277 times
DualPane2AxisCode.scr
(48 KiB) Downloaded 274 times
ModbusMasterVer1_cyclone.c
(17.88 KiB) Downloaded 267 times
ModbusMaster_cyclone.h
(564 Bytes) Downloaded 281 times
Cyclone_Init.c
(10.32 KiB) Downloaded 281 times
Cyclone_EStopMonitor.c
(3.2 KiB) Downloaded 280 times
cyclone.h
(2.67 KiB) Downloaded 282 times

User avatar
TomKerekes
Posts: 2676
Joined: Mon Dec 04, 2017 1:49 am

Re: Odd user button issue

Post by TomKerekes » Tue Apr 30, 2019 10:59 pm

Hi Moray,

IDC_But8 has a Var=48 so the Toggle button will toggle bit 48. Wouldn't that cause the problem?

There isn't any Action to Toggle a bit. You have that configured to Set bit 155. That should be removed.
Regards,

Tom Kerekes
Dynomotion, Inc.

Moray
Posts: 288
Joined: Thu Apr 26, 2018 10:16 pm

Re: Odd user button issue

Post by Moray » Wed May 01, 2019 8:23 pm

I knew it would be something stupidly obvious!
And yes, bit 48 is the SYSTEMOK bit that gets set low to trigger the e-stop handling routine.
And now I've realised that, the toolchanger error message will be getting displayed as it's the first option in the e-stop enum, and the variable that gets used for selecting what message to display, will be defaulted to zero aka the toolchanger message.

I've been away all day, but I'll try changing the values tomorrow.

Post Reply