DMC created and tested a library of Siemens function blocks for S7-300 PLCs using Simatic Manager that can be used to communicate with a manufacturer's 6 axis Cartesian robot. The function blocks are now provided by the manufacturer so that end users can easily communicate with the robot and execute standard commands.
DMC's customer has a standalone 6-axis Cartesian robot that is often used with other industrial hardware. Sometimes, the client's end customer has a solution that includes a Siemens PLC controlling part of their process that needs to interact with the client's robot. In order to do this, the manufacturer has a General Station Description (GSD) file and a Profibus option card that can be used to communicate with most PLCs. However, the communication protocol between the two involves a non-trivial exchange of signals between the PLC and the robot.
In order to send a command to the robot, the PLC must coordinate the state of the robot, the command ID, the data that affects the command, and monitor the command for faults. For the state of the robot, the PLC needs to make sure the robot is on, ready to receive commands, homed, and has no faults. Then, the PLC must select the correct command ID from the 70 or so possible commands. With the command ID, various other flags and data must be written to the robot. For example, when jogging an axis, the desired axis needs to be selected, the jog speed specified, and the jog direction written. If the instruction requires it, position feedback needs to be read back during movement as well. The PLC also needs to monitor the command to ensure a proper reaction if something goes wrong. This can include anything from the axis being disabled to an out-of-range value being entered.
The final library has about 70 Function Blocks in total. Many of these are movements instructions to the robot. There are instructions to move to a preconfigured point, as defined on the robot, or to a point specified in space. There are also instructions to move a single axis a defined amount and to move the entire robot together. Other instructions write data to the robot. The library can write to the default movement speed, turn the robot on and off, assign a new point, and set shift data. More instructions also read data back from the robot. The current position, speed, coordinates of a point, and servo state can all be read using the library.
Learn more about DMC's Siemens S7 PLC programming expertise.