TwinCAT operations
TwinCAT Safety
Use the EditorBuilder
in order to register custom SearchStrategy
implementations:
- TwinSAFE Function block
- TwinSAFE Group: Input/Outputs
- TwinSAFE Connetion: Term(EL1904/EL2904), check
Map Inputs
andMap Outputs
- AX5206: Process Data -> PDO Content -> Insert variables
If your strategy should be used instead of another already registered strategy (ie. they support the same pattern), you can give it a higher priority:
$builder->addSearchStrategy($strategy, 50);
Important: The higher the priority is, the sooner the strategy will be returned if it supports the given pattern.
Note:A default priority of 0 is assigned to strategies if you don't specify it.
SearchStrategy API
Implementations provided out of the box are:
LineRegexSearchStrategy
: regular expression search, supports regex (/pattern/
)SameSearchStrategy
: strict equality search (===
), supports strings
TwinCAT Motion
Editor
actually uses the CommandInvoker
in its following methods:
insertAbove
insertBelow
Set NC Parameters
Implementations provided out of the box are:
LineInsertAboveCommand
:text
,addition
and optionallocation
(name:insert_above
)LineInsertBelowCommand
:text
,addition
and optionallocation
(name:insert_below
)LineRemoveCommand
:text
and optionallocation
(name:remove
)LineReplaceCommand
:text
,replacement
and optionallocation
(name:replace
)LineReplaceAllCommand
:text
,pattern
andreplacement
(name:replace_all
)
Jogging
Currently, here's the sanitizers provided out of the box:
LocationSanitizer
: checks if the line number is valid (positive integer strictly inferior to the text's length) or return the current line numberTextSanitizer
: checks the presence and type of thetext
parameter