From 63a2274f4231945228a0626dbb7447d8035adcca Mon Sep 17 00:00:00 2001 From: pan261 Date: Mon, 27 Sep 2021 14:21:46 -0400 Subject: [PATCH] supresses m130 media calls in Mills --- Haas_Mills_BIDC/Bechtel DT.cps | 19 ++++++++++++++++--- Haas_Mills_BIDC/Bechtel VF2.cps | 21 +++++++++++++++++---- Haas_Mills_BIDC/Bechtel VF4.cps | 19 ++++++++++++++++--- 3 files changed, 49 insertions(+), 10 deletions(-) diff --git a/Haas_Mills_BIDC/Bechtel DT.cps b/Haas_Mills_BIDC/Bechtel DT.cps index c618ce4..3be0f57 100644 --- a/Haas_Mills_BIDC/Bechtel DT.cps +++ b/Haas_Mills_BIDC/Bechtel DT.cps @@ -446,6 +446,13 @@ properties = {/* type: "boolean", value: true, scope: "post" + }, + displayMediaCalls: { + title: "M130 Media calls", + description: "Enable to include M130 part images with the NC file..", + group: 4, + value: false, + scope: "post" } }; @@ -2063,7 +2070,10 @@ function previewImage() { } } if (images.length > 0) { - writeBlock(mFormat.format(130), "(" + images[images.length - 1] + ")"); + getProperty("displayMediaCalls") ? + writeBlock(mFormat.format(130), "(" + images[images.length - 1] + ")") + : + writeOptionalBlock(mFormat.format(130), "(" + images[images.length - 1] + ")"); } } } @@ -2473,7 +2483,10 @@ function onSection() { if (insertToolCall || operationNeedsSafeStart) { if (staticProperties.useM130PartImages) { - writeBlock(mFormat.format(130), "(tool" + tool.number + ".png)"); + getProperty("displayMediaCalls") ? + writeBlock(mFormat.format(130), "(tool" + tool.number + ".png)") + : + writeOptionalBlock(mFormat.format(130), "(tool" + tool.number + ".png)"); } if (!isFirstSection() && staticProperties.optionalStop && insertToolCall) { @@ -2831,7 +2844,7 @@ function onSection() { // Displays a file: MP4, MOV, PNG, JPEG. 1920x1080 // Input: Absolute path to file function displayMedia(file, isOptional) { - if (isOptional) { + if (isOptional || !getProperty("displayMediaCalls")) { writeOptionalBlock(mFormat.format(130), formatComment("Net Share/Media/" + file)); } else { writeBlock(mFormat.format(130), formatComment("Net Share/Media/" + file)); diff --git a/Haas_Mills_BIDC/Bechtel VF2.cps b/Haas_Mills_BIDC/Bechtel VF2.cps index 091fbfc..5738200 100644 --- a/Haas_Mills_BIDC/Bechtel VF2.cps +++ b/Haas_Mills_BIDC/Bechtel VF2.cps @@ -446,6 +446,13 @@ properties = {/* type: "boolean", value: true, scope: "post" + }, + displayMediaCalls: { + title: "M130 Media calls", + description: "Enable to include M130 part images with the NC file..", + group: 4, + value: false, + scope: "post" } }; @@ -2063,7 +2070,10 @@ function previewImage() { } } if (images.length > 0) { - writeBlock(mFormat.format(130), "(" + images[images.length - 1] + ")"); + getProperty("displayMediaCalls") ? + writeBlock(mFormat.format(130), "(" + images[images.length - 1] + ")") + : + writeOptionalBlock(mFormat.format(130), "(" + images[images.length - 1] + ")"); } } } @@ -2473,7 +2483,10 @@ function onSection() { if (insertToolCall || operationNeedsSafeStart) { if (staticProperties.useM130PartImages) { - writeBlock(mFormat.format(130), "(tool" + tool.number + ".png)"); + getProperty("displayMediaCalls") ? + writeBlock(mFormat.format(130), "(tool" + tool.number + ".png)") + : + writeOptionalBlock(mFormat.format(130), "(tool" + tool.number + ".png)"); } if (!isFirstSection() && staticProperties.optionalStop && insertToolCall) { @@ -2831,7 +2844,7 @@ function onSection() { // Displays a file: MP4, MOV, PNG, JPEG. 1920x1080 // Input: Absolute path to file function displayMedia(file, isOptional) { - if (isOptional) { + if (isOptional || !getProperty("displayMediaCalls")) { writeOptionalBlock(mFormat.format(130), formatComment("Net Share/Media/" + file)); } else { writeBlock(mFormat.format(130), formatComment("Net Share/Media/" + file)); @@ -2894,7 +2907,7 @@ function getTA(file, seqNum, gotoRef) { writeWords("N" + nFormat.format(seqNum), gFormat.format(53), gFormat.format(0), zOutput.format(0.), formatComment("Retract spindle")); - writeWords(mFormat.format(130), formatComment(file)); + getProperty("displayMediaCalls"); writeWords(mFormat.format(0), formatComment("Halt Program")); writeWords(mFormat.format(131)); writeWords("GOTO" + nFormat.format(gotoRef), formatComment("Return to beginning of operation")); diff --git a/Haas_Mills_BIDC/Bechtel VF4.cps b/Haas_Mills_BIDC/Bechtel VF4.cps index 359bc34..894b438 100644 --- a/Haas_Mills_BIDC/Bechtel VF4.cps +++ b/Haas_Mills_BIDC/Bechtel VF4.cps @@ -446,6 +446,13 @@ properties = {/* type: "boolean", value: true, scope: "post" + }, + displayMediaCalls: { + title: "M130 Media calls", + description: "Enable to include M130 part images with the NC file..", + group: 4, + value: false, + scope: "post" } }; @@ -2062,7 +2069,10 @@ function previewImage() { } } if (images.length > 0) { - writeBlock(mFormat.format(130), "(" + images[images.length - 1] + ")"); + getProperty("displayMediaCalls") ? + writeBlock(mFormat.format(130), "(" + images[images.length - 1] + ")") + : + writeOptionalBlock(mFormat.format(130), "(" + images[images.length - 1] + ")"); } } } @@ -2477,7 +2487,10 @@ function onSection() { if (insertToolCall || operationNeedsSafeStart) { if (staticProperties.useM130PartImages) { - writeBlock(mFormat.format(130), "(tool" + tool.number + ".png)"); + getProperty("displayMediaCalls") ? + writeBlock(mFormat.format(130), "(tool" + tool.number + ".png)") + : + writeOptionalBlock(mFormat.format(130), "(tool" + tool.number + ".png)"); } if (!isFirstSection() && staticProperties.optionalStop && insertToolCall) { @@ -2835,7 +2848,7 @@ function onSection() { // Displays a file: MP4, MOV, PNG, JPEG. 1920x1080 // Input: Absolute path to file function displayMedia(file, isOptional) { - if (isOptional) { + if (isOptional || !getProperty("displayMediaCalls")) { writeOptionalBlock(mFormat.format(130), formatComment("Net Share/Media/" + file)); } else { writeBlock(mFormat.format(130), formatComment("Net Share/Media/" + file));