How do I setup my Marking Head to mark automatically with a PLC?
One of the most common laser marking applications uses a basic automation scheme, in which a PLC is to command the Marking Head to fire a mark over and over and over… While WinMark Pro is well suited to this and much more complex applications, it is not intuitively obvious how this is done at the WinMark Pro end of things, or how the PLC should be wired to the Marking Head. The WinMark Pro manual spells out a way to set the automation up, but the question arises: “How is this supposed to work at the PLC end?”.
While this operating scheme can and has been setup in many different ways, the following method has been shown to be very robust in the face of the myriad problems that can arise on a production line.
Note that you must have WinMark Pro to perform the automation described below. Those customers that are using WinMark Pro Lite must upgrade to have all of the described automation features available for use. To find out which version you have, open the Help/About WinMark Pro window and the particular version and build information will be displayed. Please contact a Synrad sales representative for information on upgrading WinMark Pro Lite to Pro.
Note also that this scheme, although described here for the Fenix/FH Marking Heads, may be adapted to use any of the Input or Output lines that are available on your particular Marking Head. For more information on the I/O available for the various Marking Head models, see Synrad Technical Bulletin #01, available for download here.
So, how to set up the system? First of all, wire up the equipment:
- 1. Wire a PLC output to supply IN0 of the Marking Head with a laser ‘GO’ signal. The signal level should switch from less than 5VDC (DON’T GO) to 15 – 40VDC (GO).
- 2. Wire OUT4 of the Marking Head to supply the PLC a laser ‘READY’ signal. Wire the laser output as an open contact (capable of up to 40mA of current) that either switches the PLC supply to a ground referenced PLC input (a ‘pull-up’ or ‘sourcing’ output to a ‘sinking’ input), or switches the PLC input’s return to ground on a supply referenced PLC input (a ‘pull-down’ or ‘sinking’ output to a ‘sourcing’ input). In either case, when WinMark Pro signals that the laser is ‘READY’, current will flow through the PLC input; when the laser is ‘NOT READY’, current will NOT flow through the PLC input.
(Refer to your Marking Head’s user’s manual for circuit diagrams that illustrate the various ways the I/O can be connected.)
- 3. Create a mark file with the following automation:
- 4. Select the Drawing Object in WinMark Pro, then click on the Automation tab.
- 5. Program the Set Digital Before Piece automation to set OUT4 = 1.
- 6. Program the Wait Digital Before Piece automation to wait for IN0 = 1.
- 7. Program the Set Digital Before Mark automation to set OUT4 = 0.
- 8. Program the Wait Digital After Piece automation to wait for IN0 = 0.
- 9. Program the Set Digital After Mark automation to set OUT4 = 1.
- 10. Click on the ‘Marking’ tab and set the ‘Mark Count’ property for the desired number of Mark Loops for the mark session. It is typical to enter ‘0’ for Mark Count, so that the Marking Head will mark indefinitely until the ESC key is pressed to abort marking.
Set up the PLC programming to drive the process as follows:
- 1. Move the part into place to be marked, then wait until the Marking Head supplies a ‘READY’ signal to the PLC.
- 2. Set the ‘GO’ output to commence marking.
- 3. Wait for the Marking Head ‘READY’ line to switch to ‘NOT READY’, which signals that lasing is in progress.
- 4. Upon seeing the ‘NOT READY’ signal, the PLC should switch the ‘GO’ output to ‘DON’T GO’. This may occur anytime while the mark is in progress.
- 5. After the mark is complete, as long as WinMark Pro sees the ‘DON’T GO’ signal, the laser should return to ‘READY’ and the part can be moved out of the marking area and the next part can be moved into place. Once the part is in place, assert the ‘GO’ signal and start all over again.
This provides a hardware handshaking method for the PLC and WinMark Pro to communicate, with the following advantages:
You avoid the need to use timed outputs on the PLC to give the Marking Head enough time to complete the mark. Using this automation method means that WinMark Pro and the PLC take no more time than is required for each of them to complete their tasks.
If either the Marking Head or the PLC stop responding via the I/O signals, the entire process stops. For instance, if the Marking Head stops toggling the ‘READY’ line, the PLC will not simply continue cycling parts through unmarked.
How do I use the serial port to input data into my WinMark Pro file?
How can I get serial port input data to format as multiple lines of text in one text object?
The automation features of WinMark Pro allow ASCII formatted string data to be transmitted to the WinMark Pro PC and applied to any property of any WinMark Pro drawing file object.
Data transmission properties:
- 1. The data must be transmitted as RS232 signals at 9600 baud, 8 bits, 1 stop bit, and no parity (9600,8,1,N).
- 2. Each data set must be terminated with a Carriage Return character (CR, ^M, 0D Hex, 13 decimal).
- 3. Text data applied to a single text object may be formatted in multiple lines using a Line Feed character (LF, ^J, 0A Hex, 10 decimal).
WinMark Pro may be configured to use data received through the serial port in the following ways:
Using the Auto Text function:
- 1. Place a text object on the Drawing Canvas.
- 2. When the Text Caption Editor window appears, enter the desired default caption, or click on OK to leave the caption as ‘text’.
- 3. With the text object selected, click on the ‘Automation’ tab in the properties list. (If you don’t see the properties list, see “Why don’t I see the object properties?”)
- 4. Click on the drop-down arrow to the right of the ‘Auto Text Type’ property box.
- 5. Select ‘Serial Port Text’ from the drop-down list.
- 6. Enter the desired communication port in the ‘Text From Comm Port’ property. For most computers, this will be Com1 or Com2.
- 7. Enter the number of milliseconds that WinMark Pro should wait before it notifies the operator that the serial data has not been received. For instance, if you want the timeout value to be one second, enter ‘1000’. If you want WinMark Pro to wait indefinitely for the serial termination string, set this value to ‘-1’. Note that WinMark Pro must receive a Carriage Return character, with or without other data, to avoid timing out.
- 8. Set the other properties as required.
Using the Read From Serial Port command in the Event Builder:
- 1. Place a text object on the Drawing Canvas.
- 2. Select the Drawing either by clicking on a blank part of the Drawing Canvas, or by clicking on the ‘Drawing’ item in the Object List in the upper right corner of the WinMark Pro window.
- 3. Click on the ‘Automation’ tab.
- 4. Open the Event Builder at the appropriate automation stage by clicking on the ellipsis button to the right of the ‘Undefined’ or ‘Event Defined’ text.
- 5. Click on the ‘Add’ button in the Event Builder window.
- 6. Select ‘ReadFromSerialPort’ from the drop-down list of available commands.
- 7. Set the desired COM Port and Timeout values. If you want WinMark Pro to wait indefinitely for the serial data, enter ‘-1’ as the timeout value.
- 8. Select the desired object and property to which the serial data will be applied from the ‘Target Object and Property’ list boxes.
Note that while the Auto Text function simply assigns the serial data to the Text Caption property of the text object, the Event Builder function allows much greater flexibility. For instance, the serial data could be assigned to the text object’s caption, font, or height properties, so that the Event Builder provides the means to control the marking process to a much higher degree.
[Back to Questions] [Top of Page] [Previous Page] [Next Page]
