Automatic G-code import
The user operates the functionality of the G-code import service via the input/output variables of the IEC function block of the G-code import. The variables are either controlled via the user program (which in turn is optionally controlled via a fieldbus interface, for example) or linked to a visualization system that is connected to the MOVI-C® CONTROLLER. For this purpose, it is possible, for example, to read the names of the files present in the source directory of the import computer into the IEC for the purpose of display in the connected visualization system. The G-code files to be imported must be available in the parameterized source directory of the import computer prior to the import, and the import service must be started on the import computer. When activating the IEC function block for G-code import, it establishes a connection to the import computer via a parameterizable TCP port. During runtime, additional G-code files, e.g. as an export from a user's CAD application, can be copied into the source directory for subsequent import. The G-code programs can either be imported and executed sequentially, or the import is performed to another program slot even during the execution of an imported program.
The In.Process input in the IEC allows the programmer to overwrite individual settings. This allows the programmer, for example, to adjust the scaling of the translational coordinates before each import. If a setting is overwritten by the IEC user interface, the setting from the loaded configuration file will be ignored.
Parameterize and activate the connection of the function block with the import service run on the import computer via the In structure. If the function block is activated and the IP address is set, the function block attempts to connect. Note that there is no timeout for the connection attempt. If the connection is interrupted, the block automatically tries to re-establish the connection. Function block and service are subject to versioning. If a connection can be established, the compatibility is automatically checked based on the version. If the versions of the import block and import service are not compatible with each other, no further signals are sent and an error is output.
- In.stCommunication.xEnable – activate function block
- n.stCommunication.sServerIP – IP address of the target computer
- In.stCommunication.uiServerPort – port address of the instance of the running import service
The functionalities of the IEC function block for G-code import are configured and started via the In structure. Variables in the Out structure return the result of the executed function. The IEC programmer must first parameterize the import and then start it by means of a rising edge at xStartImport. The parameterization is retained modally and is not reset after starting a run. Changes to the parameterization after a signal has been sent are only accepted with the next rising edge.