DT02 Tool Touchoff Sensor - SUCCESS

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

Arrow
Posts: 8
Joined: Tue Feb 05, 2019 12:37 am
Acorn CNC Controller: No
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: DT02 Tool Touchoff Sensor

Post by Arrow »

You also have to have message identified at top of program with other messages, and add it to the plcmsg.txt file
cbb1962
Posts: 349
Joined: Wed Jan 03, 2018 10:04 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 38D2695C8301-0122180576
DC3IOB: No
CNC11: No
CPU10 or CPU7: No
Location: NW Arkansas

Re: DT02 Tool Touchoff Sensor

Post by cbb1962 »

I'm guessing that once you modify your local src file and we update to V4.14 we will have to make the same changes again - unless Centroid includes it in the src code?
Clint in NW Arkansas

The more I learn, the more I realize I don't know...
cncman172
Posts: 254
Joined: Thu Nov 02, 2017 4:07 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 985DAD429EE9-0926170118
DC3IOB: No
CNC11: No
CPU10 or CPU7: No
Location: Westerville, Ohio

Re: DT02 Tool Touchoff Sensor

Post by cncman172 »

cbb1962,
You are correct each time you make changes I would have to add the code again. In fact I was examining the source and noticed it must get changed each time you run the Wizard. Why do I think that is the case? Because if you look at my configuration for input and output assignments they are actually in the acorn_mill_plc.src file. As long as I leave the name exactly the same it would work until the next upgrade, I think. :)

Arrow,
I notice the plc messages, and in some cases some messages did not seem to be added. Will examine that a little closer before I try the compile. My first attempt at compiling the source outside of running the Wizard.

Russ


;==============================================================================
InitialStage
;==============================================================================
IF SV_MACHINE_PARAMETER_822 > 0 THEN SET HomeAllStage

IF 1==1 THEN SET True,
SET OnAtPowerUp_M,
SET AxesEnableStage,
SET MainStage,
SET JogPanelStage,
SET LoadParametersStage,
SET MPGStage,
SET PLCBus_Oe_M,
RST DriveComFltIn_M,
RST DriveComFltOut_M,
RST PLCFault_M,
CycloneStatus_T = 300,
FaultMsg_W = MSG_CLEARED_MSG,
RST BadMsgStage,
SET MessageStage,
Initialize_T = 1000, SET Initialize_T,
ErrorFlag_T = 1000,
MsgClear_T = 1000,
IF Tooltouchofftriggered THEN InfoMsg_W = PRESS_TOOL_TOUCHOFF_SENSOR_TO_INITIALIZE,
RST InitialStage


; PairedHomingStage IS STG70
; ZriHomeStage IS STG71
; ZFollowingStage IS STG72
; LimitAllStage IS STG73
; UsbMpgStage IS STG74
cncman172
Posts: 254
Joined: Thu Nov 02, 2017 4:07 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 985DAD429EE9-0926170118
DC3IOB: No
CNC11: No
CPU10 or CPU7: No
Location: Westerville, Ohio

Re: DT02 Tool Touchoff Sensor

Post by cncman172 »

Looks like the messages are defined as constant definitions. Still reading to get more details in the PLC programming guide. Wow lots of reading. Ha Ha

Russ


;------------------------------------------------------------------------------
; CONSTANT DEFINITIONS
;------------------------------------------------------------------------------
PLC_EXECUTOR_FLT_MSG IS 257; (1+256*1)

MIN_FROR_PCT IS 1
SPINDLE_LOCK_TIMEOUT IS 1025;(2+256*4)

RAPID_OVERRIDE_ENABLED IS 1282;(2+256*5)
RAPID_OVERRIDE_DISABLED IS 1538;(2+256*6)
CHUCK_TIMEOUT IS 1793;(1+256*7)
PART_CHUTE_TIMEOUT IS 2049;(1+256*8)
CUT_OFF_TIMEOUT IS 2305;(1+256*9)

PLC_INFLT IS 5634;(2+256*22)
PLC_OUTFLT IS 5890;(2+256*23)
PLC_FLT_CLR IS 6146;(2+256*24)

SPINDLE_FAULT_MSG IS 7681;(1+256*30)
cncman172
Posts: 254
Joined: Thu Nov 02, 2017 4:07 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 985DAD429EE9-0926170118
DC3IOB: No
CNC11: No
CPU10 or CPU7: No
Location: Westerville, Ohio

Re: DT02 Tool Touchoff Sensor

Post by cncman172 »

After reading more in the PLC programming manual and taking feedback from Arrow, here is what I have done in preparations of compiling the PLC program. Keeping my fingers crossed. LOL I was a C programmer for years but much of the context of PLC programming is different.

Russ



************************************************

Added the following constant definition for message inside of acorn_mill_plc.src, this is message 74, which is Asynchronous


;------------------------------------------------------------------------------
; CONSTANT DEFINITIONS
;------------------------------------------------------------------------------


PRESS_DT02_TOUCHOFF_SENSOR_TO_INITIALZE IS 18946;(2+256*74)



**************************************************

Added "IF Tooltouchofftriggered" to initialStage inside of acorn_mill_plc.src


;==============================================================================
InitialStage
;==============================================================================
IF SV_MACHINE_PARAMETER_822 > 0 THEN SET HomeAllStage

IF 1==1 THEN SET True,
SET OnAtPowerUp_M,
SET AxesEnableStage,
SET MainStage,
SET JogPanelStage,
SET LoadParametersStage,
SET MPGStage,
SET PLCBus_Oe_M,
RST DriveComFltIn_M,
RST DriveComFltOut_M,
RST PLCFault_M,
CycloneStatus_T = 300,
FaultMsg_W = MSG_CLEARED_MSG,
RST BadMsgStage,
SET MessageStage,
Initialize_T = 1000, SET Initialize_T,
ErrorFlag_T = 1000,
MsgClear_T = 1000,
IF Tooltouchofftriggered THEN InfoMsg_W = PRESS_DT02_TOUCHOFF_SENSOR_TO_INITIALZE,
RST InitialStage

************************************************

Added the following to plcmsg.txt file

74 PRESS_DT02_TOUCHOFF_SENSOR_TO_INITIALIZE
cncman172
Posts: 254
Joined: Thu Nov 02, 2017 4:07 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 985DAD429EE9-0926170118
DC3IOB: No
CNC11: No
CPU10 or CPU7: No
Location: Westerville, Ohio

Re: DT02 Tool Touchoff Sensor

Post by cncman172 »

Well no dice. I get a compiler error.

Error Line 1780 Col 5: Invalid Action, Compilation Failed

When I started CNC12 I get two undefined PLC message errors (33) and (39), guessing these are caused because I have added a message to plcmsg.txt and the compile failed so the message is not defined.

The main error appears to be where I put the IF in the Initial stage.

IF Tooltouchofftriggered THEN InfoMsg_W = PRESS_DT02_TOUCHOFF_SENSOR_TO_INITIALIZE,

I think my error is I put this in a series of SET, RST and it needs to happen outside of that set of commands.

Russ
cncman172
Posts: 254
Joined: Thu Nov 02, 2017 4:07 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 985DAD429EE9-0926170118
DC3IOB: No
CNC11: No
CPU10 or CPU7: No
Location: Westerville, Ohio

Re: DT02 Tool Touchoff Sensor

Post by cncman172 »

Fixed compiler error by moving my addition, so now it compiles fine but I get a undefined PLC message 33 when I start CNC12. The parts that I modified to add this test are detailed below. My guess is since I am adding this the IF Tooltouchofftriggered test near the front of the initialstage that the messages are not yet defined, but I am just guessing at this point. The entire reason for trying to add this code in the InitialStage is because it only runs one time.

Comments and Suggestions Welcome. Thanks Gang

Russ



part of plcmsg.txt

70 INCREMENTAL_SELECTED
71 PLEASE_SELECT_AN_AXIS
72 RESET2_DETECTED_PLEASE_CYCLE
73 PRESS_ALT_J_TO_ENABLE_USB_JOGGING
74 PRESS_DT02_TOUCHOFF_SENSOR_TO_INITIALIZE
99
100 5100 BAD MESSAGE VALUE


part of acorn_mill_plc.src

;==============================================================================
InitialStage
;==============================================================================
IF SV_MACHINE_PARAMETER_822 > 0 THEN SET HomeAllStage
IF Tooltouchofftriggered THEN InfoMsg_W = PRESS_DT02_TOUCHOFF_SENSOR_TO_INITIALZE
IF 1==1 THEN SET True,
SET OnAtPowerUp_M,
SET AxesEnableStage,
SET MainStage,
SET JogPanelStage,
SET LoadParametersStage,
SET MPGStage,
SET PLCBus_Oe_M,
RST DriveComFltIn_M,
RST DriveComFltOut_M,
RST PLCFault_M,
CycloneStatus_T = 300,
FaultMsg_W = MSG_CLEARED_MSG,
RST BadMsgStage,
SET MessageStage,
Initialize_T = 1000, SET Initialize_T,
ErrorFlag_T = 1000,
MsgClear_T = 1000,
RST InitialStage


;------------------------------------------------------------------------------
; CONSTANT DEFINITIONS
;------------------------------------------------------------------------------

PRESS_DT02_TOUCHOFF_SENSOR_TO_INITIALZE IS 18946;(2+256*74)
cncman172
Posts: 254
Joined: Thu Nov 02, 2017 4:07 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 985DAD429EE9-0926170118
DC3IOB: No
CNC11: No
CPU10 or CPU7: No
Location: Westerville, Ohio

Re: DT02 Tool Touchoff Sensor

Post by cncman172 »

There seem to be some inconsistencies in the PLC programming manual. This section of the manual says the PLC message must have three sections
MessageNumber MessageLogNumber Message

If you actually look inside of plcmsg.txt you will find the following; Notice how many of the messages do not have the MessageLogNumber. I did not add the log number, so perhaps that is why I am getting my undefined message. But they have many messages in the file that do not have the Log number either, which is confusing?

Russ



50 2050 Auto Coolant Mode
51 2051 Manual Coolant Mode
52 5052 Warning: Lube Low
53 4053 Select Auto Spindle, press CYCLE START
54 4054 Select Auto Coolant, press CYCLE START
60 X AXIS SELECTED
61 Y AXIS SELECTED
62 Z AXIS SELECTED
63 SHUTTLE_AXIS4_SELECTED
64 JOG_INCREMENT_INCREASED



plcmsg.txt
The plcmsg.txt file contains a list of all the messages that the PLC can send to CNC11. This
facility is used to notify the user of status changes and fault conditions. The typical messages
should not be overwritten by new custom messages, rather new numbers should be added.
The format for each line of the plcmsg.txt file is as follows.
MessageNumber MessageLogNumber Message
There are three fields separated by one space each that must be setup for a line to be valid
and usable. If the line is not formed correctly, you will not know it until the message is trying to
display. The MessageNumber field is exactly the same number as the Message Number in
the above table. The MessageLogNumber causes the printed message to be put in the
msglog.txt file so that problems can be diagnosed by Tech. Support.
tblough
Posts: 3131
Joined: Tue Mar 22, 2016 10:03 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: 100505
100327
102696
103432
7804732B977B-0624192192
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Boston, MA
Contact:

Re: DT02 Tool Touchoff Sensor

Post by tblough »

Cheers,

Tom
Confidence is the feeling you have before you fully understand the situation.
I have CDO. It's like OCD, but the letters are where they should be.
cncman172
Posts: 254
Joined: Thu Nov 02, 2017 4:07 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 985DAD429EE9-0926170118
DC3IOB: No
CNC11: No
CPU10 or CPU7: No
Location: Westerville, Ohio

Re: DT02 Tool Touchoff Sensor

Post by cncman172 »

Tom,
Thanks for that document that got me closer. Apparently, they have the messages divided up into the types of messages. 5000 range is Warnings, so i updated the plcmsg.txt with the line below. I recompile the code and no errors or warnings. I start up CNC12 no errors or undefined PLC messages. But no output either. LOL

Initially when I start up CNC12 the DT02 will have input4, tooltouchoff triggered, I have a green LED. If I press the DT02 one time it goes to RED, indicating that nothing is touching the DT02. It is now awake. Maybe I can't have this code in the Initialstage. Still learning all this PLC coding I am getting closer I can feel it. :)

Russ


plcmsg.txt

74 5074 WARNING: PRESS_DT02_TOUCHOFF_SENSOR_TO_INITIALIZE


acorn_mill_plc.src
;------------------------------------------------------------------------------
; CONSTANT DEFINITIONS
;------------------------------------------------------------------------------
DT02_TOUCHOFF_WARNING IS 18946;(2+256*74)


;==============================================================================
InitialStage
;==============================================================================
IF SV_MACHINE_PARAMETER_822 > 0 THEN SET HomeAllStage
IF Tooltouchofftriggered THEN InfoMsg_W = DT02_TOUCHOFF_WARNING
Post Reply