Table lock on pre-assembly workstations

From PlcWiki

(Difference between revisions)
Jump to: navigation, search
Petr.zalabak (Talk | contribs)
(Created page with 'Example of the configuration. The original workstation had the following operations: * KN1 - Part check * KN2 - Optional part check * KN3 - Optional tightening * KN4 - Optional t…')

Current revision as of 11:56, 30 March 2011

Example of the configuration. The original workstation had the following operations:

  • KN1 - Part check
  • KN2 - Optional part check
  • KN3 - Optional tightening
  • KN4 - Optional tightening

The request for the table lock is: "The table will be locked after OK result of the part check KN2. The tightening machine must be blocked untill the table will be locked. When all operations are finished, the table will be unlocked."

To register the event when the table is locked, we created a new operation KN6, type RackPartCheck. An input for this operation is a signal from the lock, that the table was locked. Then the dependency of KN3 and KN4 on KN6 can be used for the tightening machine blocking.

Here is the new definition of operations:

operation.PartCheck_1.Type = PartCheck
operation.PartCheck_1.Index = 1
operation.PartCheck_1.WindowTitle = Oblozeni / Airbag
operation.PartCheck_1.ToDoMessage = Scan Oblozeni / Airbag
operation.PartCheck_1.Default = 1
operation.PartCheck_1.ToleranceOverPlan = 0
operation.PartCheck_1.SelectBegin[0] = " 7P5 858 903"
operation.PartCheck_1.SelectBegin[1] = 7P5858903
operation.Knieairbag.Type = PartCheck
operation.Knieairbag.Index = 2
operation.Knieairbag.ReportDevice = report_kn2 # After OK part check we activate this device (see below to devices definition). The table will be locked
operation.Knieairbag.WindowTitle = Knieairbag
operation.Knieairbag.ToDoMessage = Scan "Knieairbag"
operation.Knieairbag.Default = 1
operation.Knieairbag.ToleranceOverPlan = 0
operation.Knieairbag.SelectBegin[0] = "363#"
operation.Knieairbag.PartLength[0] = 18
operation.Knieairbag.PartStart[0] = 5
operation.Knieairbag.SNStore = Yes
operation.Knieairbag.InvalidLabelAllowed = No
operation.Tightening_1.Type = Tightening
operation.Tightening_1.Index = 3
operation.Tightening_1.Device = tight_mach_1
operation.Tightening_1.DependsOn = 6 # The tightening machine is unblocked after the table is locked
operation.Tightening_1.ChannelNumber = 1
operation.Tightening_1.WindowTitle = Knieairbag 1
operation.Tightening_1.Spec[0] = 1
operation.Tightening_1.Tool = 1
operation.Tightening_1.Default = 8
operation.Tightening_1.ToleranceOverPlan = 1
operation.Tightening_2.Type = Tightening
operation.Tightening_2.Index = 4
operation.Tightening_2.Device = tight_mach_1
operation.Tightening_2.DependsOn = 6 # The tightening machine is unblocked after the table is locked
operation.Tightening_2.ChannelNumber = 1
operation.Tightening_2.WindowTitle = Knieairbag 2
operation.Tightening_2.Spec[0] = 2
operation.Tightening_2.Tool = 2
operation.Tightening_2.Default = 3
operation.Tightening_2.ToleranceOverPlan = 1
New operation
operation.Zamek_stolu.Type = RackPartCheck
operation.Zamek_stolu.Index = 6
operation.Zamek_stolu.Device = zamek_stolu # When the table is locked, this operation is confirmed and tightening machines can be unblocked.
operation.Zamek_stolu.DependsOn = 2
operation.Zamek_stolu.WindowTitle = Table lock
operation.Zamek_stolu.ToDoMessage = Lock the table
operation.Zamek_stolu.Default = 1
operation.Zamek_stolu.ToleranceOverPlan = 0
operation.Zamek_stolu.SelectPattern[0] = NO_BARCODE
operation.Zamek_stolu.SNStore = No
# A device for the table lock. The table is locked by the report device "report_kn" (on an operation KN2) and this
# report device is released when the complete product is finished. The RackPartCheck defice "zamek_stolu" reports
# us when the table is really locked. Both devices share one low level device. First two bits (0 and 1)
# are used by the report device and the bit 2 is used by the RackPartCheck device.

#include "/usr/local/plc/etc/drivers/RACK_IO.drv"
#include "/usr/local/plc/etc/drivers/REPORT_IO.drv"
workplace.devicehub.rackshub1 = yes

workplace.devicehub.rackshub1.low_level.device.racks1 = yes
workplace.devicehub.rackshub1.low_level.device.racks1.driver = RACK_IO
workplace.devicehub.rackshub1.low_level.device.racks1.settings.output_reverse_logic = no
workplace.devicehub.rackshub1.low_level.device.racks1.settings.debug_mode = no
workplace.devicehub.rackshub1.low_level.device.racks1.settings.log_file = /usr/local/plc/log/rack1_io.log
workplace.devicehub.rackshub1.low_level.device.racks1.hub_map_to = 0
workplace.devicehub.rackshub1.low_level.device.racks1.hub_map_bits = 4

workplace.devicehub.rackshub1.high_level.device.report_kn2 = yes
workplace.devicehub.rackshub1.high_level.device.report_kn2.driver = REPORT_IO
workplace.devicehub.rackshub1.high_level.device.report_kn2.settings.debug_mode = no
workplace.devicehub.rackshub1.high_level.device.report_kn2.hub_map_from = 0
workplace.devicehub.rackshub1.high_level.device.report_kn2.hub_map_bits = 2

workplace.devicehub.rackshub1.high_level.device.zamek_stolu = yes
workplace.devicehub.rackshub1.high_level.device.zamek_stolu.driver = RACK_IO
workplace.devicehub.rackshub1.high_level.device.zamek_stolu.settings.debug_mode = no
workplace.devicehub.rackshub1.high_level.device.zamek_stolu.hub_map_from = 2
workplace.devicehub.rackshub1.high_level.device.zamek_stolu.hub_map_bits = 1
Personal tools