link to the updated Centroid PLC programming manual is here.

All things related to Centroid Oak, Allin1DC, MPU11 and Legacy products

Moderator: cnckeith

Post Reply
cnckeith
Posts: 7264
Joined: Wed Mar 03, 2010 4:23 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Contact:

link to the updated Centroid PLC programming manual is here.

Post by cnckeith »

ok.. throw rocks at it...and we will make it better. :D
link to the updated Centroid PLC programming manual is here.
https://www.centroidcnc.com/centroid_di ... manual.pdf
Need support? READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043
All Acorn Documentation is located here: viewtopic.php?f=60&t=3397
Answers to common questions: viewforum.php?f=63
and here viewforum.php?f=61
Gear we use but don't sell. https://www.centroidcnc.com/centroid_di ... _gear.html
cncsnw
Posts: 3829
Joined: Wed Mar 24, 2010 5:48 pm

Re: link to the updated Centroid PLC programming manual is here.

Post by cncsnw »

Page 11 takes pains to explain that CNC11 software works with MPU11 hardware, and CNC12 works with MPU11 and MPU12 hardware; but does not offer any guidance to to reader as to what hardware that is.

We all know that the MPU11 board is MPU11 hardware. Beyond that, people may need to be told. Acorn? Oak? RedOak? Allin1DC? Hickory?

Of course, this is the PLC programming manual, and the only difference between CNC11 PLC programming and CNC12 PLC programming is that a few more features and related system variables have been added over the years.

In the absence of a table showing which features were added in which versions, the distinction between CNC11 and CNC12 is probably not even relevant.
cncsnw
Posts: 3829
Joined: Wed Mar 24, 2010 5:48 pm

Re: link to the updated Centroid PLC programming manual is here.

Post by cncsnw »

Page 11 refers to Appendix H for the differences between CNC10 PLC programming, and CNC11/CNC12 PLC programming.

That information is in Appendix G.
cncsnw
Posts: 3829
Joined: Wed Mar 24, 2010 5:48 pm

Re: link to the updated Centroid PLC programming manual is here.

Post by cncsnw »

Appendix G should note that CNC11/CNC12 timers can only be controlled with SET and RST, where CNC10 timers were controlled as (coil) outputs.
cncsnw
Posts: 3829
Joined: Wed Mar 24, 2010 5:48 pm

Re: link to the updated Centroid PLC programming manual is here.

Post by cncsnw »

The "Important Note" on page 16 less clear than it could perhaps be regarding the unique behavior of output (OUTnn) bits.

Output bits may be changed (SET or RST) anywhere in the PLC program; but when PLC logic reads the value of the output, it will see the value the output had at the beginning of that scan. Any changes are not "written" to the output until the scan is complete.

This is probably illustrated better with an example, than with any amount of description.

Code: Select all

GreenButton IS INP12
YellowButton IS INP13
GreenLight IS OUT23
YellowLight IS OUT24
OpMode_M IS MEM34
GreenButtonPD IS PD56
YellowButtonPD IS PD57

; Toggle the green light on or off with each press of the green button
IF GreenButton THEN (GreenButtonPD)
IF GreenButtonPD && GreenLight THEN RST GreenLight   ; [1]
IF GreenButtonPD && !GreenLight THEN SET GreenLight  ; [2]

; Toggle operating mode on or off with each press of the yellow button,
; and display operating mode status with the yellow light
IF YellowButton THEN (YellowButtonPD)
IF YellowButtonPD && OpMode_M THEN RST OpMode_M  ; [3]
IF YellowButtonPD && !OpMode_M THEN SET OpMode_M ; [4]
IF OpMode_M THEN (YellowLight)
In the example above, the green button / green light controls would work correctly, but the yellow button / operating mode / yellow light controls would not.

That is because GreenLight is an OUT, while OpMode_M is a MEM.

If the green light is on, and the green button is pressed to turn it off:
On the line marked [1], the "image" of the outputs is updated to turn OUT23 off. However, that change will not take effect until the PLC scan is complete. Therefore, when the logic on the line marked [2] is evaluated, the value of "GreenLight" will still be on (1, true), so that line will not take any action.

If "OpMode_M" is on, and the yellow button is pressed to turn it off:
On the line marked [3], the memory bit itself is turned off (RST). That change takes effect immediately. Therefore, when the logic on the line marked [4] is evaluated, it sees that the button was pressed and OpMode_M is now off (0, false), and so that line will turn the memory bit back on (SET). As a result, once OpMode_M and the yellow light are on, it will be impossible to turn them off.
cncsnw
Posts: 3829
Joined: Wed Mar 24, 2010 5:48 pm

Re: link to the updated Centroid PLC programming manual is here.

Post by cncsnw »

The Timer example on page 18 should include logic that turns the timer back off and resets it, since that is needed more often than not.

Code: Select all

IF !MEM1 THEN RST T1
The text should also make it clear than the accumulated time resets to zero any time the timer control bit is RST.
cncsnw
Posts: 3829
Joined: Wed Mar 24, 2010 5:48 pm

Re: link to the updated Centroid PLC programming manual is here.

Post by cncsnw »

The lengthy "actual program" examples in the manual should be updated to use a current factory-standard program, rather than one from 2011 that still used Parameter 178 for input inversions, and still used "ErrorCode_W" instead of FaultMsg_W and the newer message stages.
cnckeith
Posts: 7264
Joined: Wed Mar 03, 2010 4:23 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Contact:

Re: link to the updated Centroid PLC programming manual is here.

Post by cnckeith »

thanks for the feedback, i'll get to work on it.
Need support? READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043
All Acorn Documentation is located here: viewtopic.php?f=60&t=3397
Answers to common questions: viewforum.php?f=63
and here viewforum.php?f=61
Gear we use but don't sell. https://www.centroidcnc.com/centroid_di ... _gear.html
cnckeith
Posts: 7264
Joined: Wed Mar 03, 2010 4:23 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Contact:

Re: link to the updated Centroid PLC programming manual is here.

Post by cnckeith »

what about the system variable section? in the past i remember you commenting lack of documentation in this area? what is needed/missing?
Need support? READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043
All Acorn Documentation is located here: viewtopic.php?f=60&t=3397
Answers to common questions: viewforum.php?f=63
and here viewforum.php?f=61
Gear we use but don't sell. https://www.centroidcnc.com/centroid_di ... _gear.html
cncsnw
Posts: 3829
Joined: Wed Mar 24, 2010 5:48 pm

Re: link to the updated Centroid PLC programming manual is here.

Post by cncsnw »

I haven't read that far into it yet. Other tasks were calling.

In the current PLC manual, system variables are sorted first by whether they are "CNC Software Write-Controlled" or "PLC Write-Controlled". This is problematic, because:
1) It leaves the MPU out of the picture. For example, if an axis is not yet enabled, and I press a jog key to move that axis, it is (as far as I understand it) the MPU which responds to the jog request, enables the axis, and makes the movement happen. The CNC12 software is just a spectator. Yet SV_PC_POWER_AXIS_n, supposedly a "CNC Software Write-Controlled System Variable", is going to change from 0 to 1. Perhaps in the original text "CNC Software" was supposed to encompass both the CNC11/CNC12 software running on the PC, and also the uploaded software running on the MPU. Be that as it may, I think it would be better to treat those separately. The system architecture is better understood as a three-party transaction.
2) It does not account for system variables, like SV_PC_POWER_AXIS_n in the above example, but also SV_M94_M95_nn, SV_STALL_ERROR, and many others that are allowed to be modified by multiple parties: CNC software, PLC program, and MPU.

Also, the current PLC manual sorts the system variables by data type (single bit, integer, floating point, etc.). This is an arbitrary and unnecessary distinction. The table already (to the author's credit) includes a column that specifies the data type, so there is no reason to segregate variable descriptions on that basis.

I recommend consolidating the "CNC Software Write-Controlled" and "PLC Write-Controlled" lists; adding a set of columns to specify whether that variable is allowed to be modified by the CNC software, PLC program, and/or MPU; and sort the whole list just by name.

Where needed, the descriptions could be extended to clarify information flow and expected function. For example, SV_STALL_ERROR is set only by the MPU, when it sees that an axis has stalled. This is information from the MPU to the PLC. SV_STALL_ERROR is reset only by the PLC program, when the PLC program sees that the operator has pressed the Emergency Stop or Reset button.
Post Reply