Skelett wird aus einzelnen Blöcken in der skel_scl.cfg aufgebaut
This commit is contained in:
+146
@@ -0,0 +1,146 @@
|
||||
{
|
||||
"files": {
|
||||
"tia_xlsx": "ST500592_10_5-14_ILS-{n}_TIA.xlsx",
|
||||
"positions_json": "ST500592_10_5-9_ILS_positions.json",
|
||||
"connect_json": "connect.json",
|
||||
"connect_ini": "connect.ini"
|
||||
},
|
||||
"verw_roles": {
|
||||
"In sep": "sensorInSep",
|
||||
"Sep": "stopperOutput",
|
||||
"Jam detector": "sensorJam",
|
||||
"Jam detector (LP)": "sensorJam",
|
||||
"jam detector (LP)": "sensorJam",
|
||||
"ES branch": "switchOutput",
|
||||
"ES brunch": "switchOutput",
|
||||
"conveyor full": "sensorConvFull",
|
||||
"MT in Position": "sensorCarrInPos",
|
||||
"MT in position": "sensorCarrInPos",
|
||||
"Finger in position": "sensorFinger",
|
||||
"Finger in Position": "sensorFinger",
|
||||
"PIN query": "sensorPinQuery",
|
||||
"Rad dreht ": "sensorWheel",
|
||||
"Rad dreht": "sensorWheel"
|
||||
},
|
||||
"comment_roles": [
|
||||
[
|
||||
"^in Separator",
|
||||
"sensorInSep"
|
||||
],
|
||||
[
|
||||
"^Separator",
|
||||
"stopperOutput"
|
||||
],
|
||||
[
|
||||
"Stausensor|Staumelder",
|
||||
"sensorJam"
|
||||
],
|
||||
[
|
||||
"AE Abzweig",
|
||||
"switchOutput"
|
||||
],
|
||||
[
|
||||
"F.?rderer voll",
|
||||
"sensorConvFull"
|
||||
],
|
||||
[
|
||||
"MT in Position",
|
||||
"sensorCarrInPos"
|
||||
],
|
||||
[
|
||||
"Mitnehmerfinger|Finger in",
|
||||
"sensorFinger"
|
||||
],
|
||||
[
|
||||
"Pin Abfrage|Pr.?fung MT Pos",
|
||||
"sensorPinQuery"
|
||||
],
|
||||
[
|
||||
"Rad dreht",
|
||||
"sensorWheel"
|
||||
],
|
||||
[
|
||||
"^Motor ",
|
||||
"motorOutput"
|
||||
],
|
||||
[
|
||||
"MSS ausgel",
|
||||
"motorProtection"
|
||||
]
|
||||
],
|
||||
"fbtype_rules": [
|
||||
{
|
||||
"roles": [
|
||||
"sensorPinQuery"
|
||||
],
|
||||
"fbType": "FB_ILS_MTRO_PinStore_Auto"
|
||||
},
|
||||
{
|
||||
"roles": [
|
||||
"sensorFinger"
|
||||
],
|
||||
"fbType": "FB_ILS_MTRO_Vario"
|
||||
},
|
||||
{
|
||||
"roles": [
|
||||
"sensorCarrInPos"
|
||||
],
|
||||
"fbType": "FB_ILS_MTRO_Vario"
|
||||
},
|
||||
{
|
||||
"roles": [
|
||||
"switchOutput",
|
||||
"sensorInSep"
|
||||
],
|
||||
"fbType": "FB_ILS_MTRO_1Sep1Swi"
|
||||
},
|
||||
{
|
||||
"roles": [
|
||||
"sensorInSep"
|
||||
],
|
||||
"fbType": "FB_ILS_MTRO_1Sep"
|
||||
},
|
||||
{
|
||||
"roles": [
|
||||
"motorOutput"
|
||||
],
|
||||
"fbType": "FB_Conveyor"
|
||||
},
|
||||
{
|
||||
"roles": [
|
||||
"motorProtection"
|
||||
],
|
||||
"fbType": "FB_Conveyor"
|
||||
}
|
||||
],
|
||||
"unit_re": "\\b(KR|CV)[-\\s]{0,2}(P?[MK]\\d{4}(?:_[A-Z])?)\\b",
|
||||
"area_res": [
|
||||
[
|
||||
"Block ?(\\d\\.\\d(?:\\.\\d)?)",
|
||||
"pinStoreBlock",
|
||||
"Block {m}"
|
||||
],
|
||||
[
|
||||
"\\bLS ?(\\d)\\b",
|
||||
"loadingStation",
|
||||
"LS{m}"
|
||||
],
|
||||
[
|
||||
"\\bWS ?(\\d\\.\\d)\\b",
|
||||
"workStation",
|
||||
"WS{m}"
|
||||
],
|
||||
[
|
||||
"\\bUZ(\\d{4})\\b",
|
||||
"safetyZone",
|
||||
"UZ{m}"
|
||||
]
|
||||
],
|
||||
"fbtype_template": {
|
||||
"FB_ILS_MTRO_1Sep": "call_1sep",
|
||||
"FB_ILS_MTRO_1Sep1Swi": "call_1sep1swi",
|
||||
"FB_ILS_MTRO_Vario": "call_vario",
|
||||
"FB_ILS_MTRO_PinStore_Auto": "call_1sep",
|
||||
"FB_Conveyor": "call_conveyor"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
; ================================================================
|
||||
; skel_scl.cfg — SCL-Templates fuer create_skel.py (INI-Style)
|
||||
;
|
||||
; Jede [sektion] ist ein Template; der Inhalt wird VERBATIM
|
||||
; uebernommen (Einrueckung und Leerzeilen gehoeren zum Template,
|
||||
; auch Leerzeilen am Blockende!). Zeilen, die mit ';' beginnen,
|
||||
; sind Kommentare und werden ueberall ignoriert.
|
||||
; Platzhalter im str.format()-Stil: {inst}, {tro_no}, {stopper} ...
|
||||
; geschweifte Klammern im SCL selbst als {{ }} doppeln.
|
||||
; ================================================================
|
||||
; --------------------------------------------------------------
|
||||
[var_decl]
|
||||
{inst} : "{fbtype}"; // {comment}
|
||||
; --------------------------------------------------------------
|
||||
[call_1sep]
|
||||
REGION {inst} ({shorttype}) — {comment}
|
||||
#{inst}.stInSeparator1.Settings.nSeparatorNo := "cSep{tro_no}.1";
|
||||
#{inst}.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
|
||||
#{inst}.stInSeparator1.Settings.tTrailingTime := T#500ms; // TODO Timing
|
||||
#{inst}.stInSeparator1.Settings.tHandlingTime := T#200ms; // TODO Timing
|
||||
#{inst}.stInSeparator1.Settings.tJam := "TimeForSepJam";
|
||||
#{inst}.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cIn{sen_in_sep}"];
|
||||
#{inst}.stInSenJam2 := "DB_Inputs".Sensors["cIn{sen_jam}"];
|
||||
|
||||
#{inst}.stInPriorityManager.xReleaseOk := TRUE; // TODO Priority
|
||||
|
||||
#{inst}(nInMainTroNo := "cMainTro{tro_no}",
|
||||
xInSftyOk := TRUE, // TODO Safety
|
||||
xInAllRdyToStart := TRUE,
|
||||
xInCarouselRun := TRUE, // TODO Conveyor
|
||||
xInRelease := TRUE, // TODO Release
|
||||
stInOutMachineState := #stInOutControlUnit, // TODO ControlUnit
|
||||
arInOutJamEntr1 := "DB_JamArea{tro_no}".stJam{tro_no}_1.arCarrier, // TODO Topologie
|
||||
stInOutJamEntr1 := "DB_JamArea{tro_no}".stJam{tro_no}_1.stData,
|
||||
arInOutJamExit2 := "DB_JamArea{tro_no}".stJam{tro_no}_2.arCarrier, // TODO Topologie
|
||||
stInOutJamExit2 := "DB_JamArea{tro_no}".stJam{tro_no}_2.stData,
|
||||
xOutStopper1 => "{stopper}",
|
||||
nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro{tro_no}"],
|
||||
stInOutHMI := "DB_Interface_HMI".stTRO.{inst});
|
||||
END_REGION
|
||||
|
||||
; --------------------------------------------------------------
|
||||
[call_1sep1swi]
|
||||
REGION {inst} ({shorttype}) — {comment}
|
||||
#{inst}.stInSeparator1.Settings.nSeparatorNo := "cSep{tro_no}.1";
|
||||
#{inst}.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
|
||||
#{inst}.stInSeparator1.Settings.tTrailingTime := T#100ms; // TODO Timing
|
||||
#{inst}.stInSeparator1.Settings.tHandlingTime := T#50ms; // TODO Timing
|
||||
#{inst}.stInSeparator1.Settings.tJam := "TimeForSepJam";
|
||||
#{inst}.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cIn{sen_in_sep}"];
|
||||
#{inst}.stInSenJam2 := "DB_Inputs".Sensors["cIn{sen_jam}"];
|
||||
#{inst}.stInSwitch1.Settings.nSwitchNo := "cSwi{tro_no}.1";
|
||||
|
||||
#{inst}(nInMainTroNo := "cMainTro{tro_no}",
|
||||
xInSftyOk := TRUE, // TODO Safety
|
||||
xInAllRdyToStart := TRUE,
|
||||
xInCarouselRun1 := TRUE, // TODO Conveyor
|
||||
xInRelease := TRUE, // TODO Release
|
||||
stInOutMachineState := #stInOutControlUnit, // TODO ControlUnit
|
||||
arInOutJamEntr1 := "DB_JamArea{tro_no}".stJam{tro_no}_1.arCarrier, // TODO Topologie
|
||||
stInOutJamEntr1 := "DB_JamArea{tro_no}".stJam{tro_no}_1.stData,
|
||||
arInOutJamExit2 := "DB_JamArea{tro_no}".stJam{tro_no}_2.arCarrier, // TODO Topologie (Dir1)
|
||||
stInOutJamExit2 := "DB_JamArea{tro_no}".stJam{tro_no}_2.stData,
|
||||
arInOutJamExit3 := "DB_JamArea{tro_no}".stJam{tro_no}_3.arCarrier, // TODO Topologie (Dir2)
|
||||
stInOutJamExit3 := "DB_JamArea{tro_no}".stJam{tro_no}_3.stData,
|
||||
xOutStopper1 => "{stopper}",
|
||||
xOutSw1ExTo3 => "{switch_out}",
|
||||
nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro{tro_no}"],
|
||||
stInOutHMI := "DB_Interface_HMI".stTRO.{inst});
|
||||
END_REGION
|
||||
|
||||
; --------------------------------------------------------------
|
||||
[call_vario]
|
||||
REGION {inst} ({shorttype}) — {comment}
|
||||
#{inst}.stInSeparator1.Settings.nSeparatorNo := "cSep{tro_no}.1";
|
||||
#{inst}.stInSeparator1.Settings.tDelayToNextItem := "TimeForSepWaiting_Short";
|
||||
#{inst}.stInSeparator1.stSenInSep := "DB_Inputs".Sensors["cIn{sen_in_sep}"];
|
||||
#{inst}.stInVario.stSenCarrInPos := "DB_Inputs".Sensors["cIn{sen_carr_in_pos}"];
|
||||
#{inst}.stInVario.stSenFinger := "DB_Inputs".Sensors["cIn{sen_finger}"];
|
||||
#{inst}.stInVario.stSenJam := "DB_Inputs".Sensors["cIn{sen_jam}"];
|
||||
|
||||
#{inst}(nInMainTroNo := "cMainTro{tro_no}",
|
||||
xInSftyOk := TRUE, // TODO Safety
|
||||
xInAllRdyToStart := TRUE,
|
||||
xInRelease := TRUE, // TODO Release
|
||||
stInOutMachineState := #stInOutControlUnit, // TODO ControlUnit
|
||||
arInOutJamEntr1 := "DB_JamArea{tro_no}".stJam{tro_no}_1.arCarrier, // TODO Topologie
|
||||
stInOutJamEntr1 := "DB_JamArea{tro_no}".stJam{tro_no}_1.stData,
|
||||
arInOutJamFinger := "DB_JamArea{tro_no}".stJam{tro_no}_2.arCarrier, // TODO Topologie
|
||||
xOutStopper => "{stopper}",
|
||||
xOutVarioMotor => "{motor}",
|
||||
nOutStateLast => "DB_GLOB_TroState".arTroState["cMainTro{tro_no}"],
|
||||
stInOutHMI := "DB_Interface_HMI".stTRO.{inst});
|
||||
END_REGION
|
||||
|
||||
; --------------------------------------------------------------
|
||||
[call_conveyor]
|
||||
REGION {inst} — {comment}
|
||||
#{inst}.Settings.tEnergySafeTime := "cTimeEnergySafe";
|
||||
#{inst}.Settings.xGridActive := FALSE; // TODO Grid
|
||||
#{inst}.Settings.sMotorProtectName := '{motor_protection}';
|
||||
|
||||
#{inst}(xInEnabled := TRUE, // TODO Enable
|
||||
xInMotorProtection := "{motor_protection}",
|
||||
xInPowerContactor := "{motor}",
|
||||
stInOutHMI := "DB_Interface_HMI".stConveyors.{inst});
|
||||
END_REGION
|
||||
|
||||
; --------------------------------------------------------------
|
||||
[call_sensor]
|
||||
// {comment}
|
||||
#fbSensorInput(stInSensorHW := "{bmk}",
|
||||
nInSensorNo := "cIn{bmk}",
|
||||
stInOutSensor := "DB_Inputs".Sensors["cIn{bmk}"]);
|
||||
; --------------------------------------------------------------
|
||||
[fb_main_frame]
|
||||
FUNCTION_BLOCK "FB_Main_skel_{uh}"
|
||||
{{ S7_Optimized_Access := 'TRUE' }}
|
||||
VERSION : 0.1
|
||||
// ============================================================
|
||||
// AUTOMATISCH GENERIERTES GRUNDGERUEST — create_skel.py
|
||||
// Quelle: E/A-Listen {uh} (data/)
|
||||
// TODO-Marken kennzeichnen manuell zu ergaenzende Stellen
|
||||
// (Timings, Topologie/JamAreas, Safety, Release, Priority).
|
||||
// ============================================================
|
||||
VAR
|
||||
{var_block} END_VAR
|
||||
|
||||
BEGIN
|
||||
{call_block}END_FUNCTION_BLOCK
|
||||
; --------------------------------------------------------------
|
||||
[fb_sensors_frame]
|
||||
FUNCTION_BLOCK "FB_CallSensors_skel_{uh}"
|
||||
{{ S7_Optimized_Access := 'TRUE' }}
|
||||
VERSION : 0.1
|
||||
// AUTOMATISCH GENERIERT — create_skel.py ({count} Sensoren)
|
||||
VAR
|
||||
fbSensorInput : "FB_SensorInput";
|
||||
END_VAR
|
||||
|
||||
BEGIN
|
||||
{call_block}END_FUNCTION_BLOCK
|
||||
Reference in New Issue
Block a user