From 47d2726149c76cda1ac5b3dc16ea3199c35bd641 Mon Sep 17 00:00:00 2001 From: will1742 Date: Mon, 14 Jun 2021 16:50:33 -0400 Subject: [PATCH] Basic M130 Functinality --- Haas_Next_Generation/haas vf2.cps | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/Haas_Next_Generation/haas vf2.cps b/Haas_Next_Generation/haas vf2.cps index c910818..da684cb 100644 --- a/Haas_Next_Generation/haas vf2.cps +++ b/Haas_Next_Generation/haas vf2.cps @@ -2332,9 +2332,9 @@ function onSection() { } } - var inMapping = takeInput("Y/N?", ['Y', 'N', 'X', 'Y', 'Z']); - writeln(inMapping) - + displayMedia("testfile.png"); + takeInput("Y/N", ['Y', 'N']); + cancelMedia(); // Modified 06/09/21 | Gavin Williams | will1742 // Issue 000 Init coolant after positioning setCoolant(tool.coolant); @@ -2344,6 +2344,22 @@ function onSection() { } // Added 6/14/21 | Gavin Williams | will1742 +// Issue 001 Input and Validation +// Displays a file: MP4, MOV, PNG, JPEG. 1920x1080 +// Input: Absolute path to file +function displayMedia(file) { + writeln("N" + sequenceNumber + " M130 (" + file + ")"); + sequenceNumber += getProperty("sequenceNumberIncrement"); +} + +// Ends displayed media +function cancelMedia() { + writeln("N" + sequenceNumber + " M131 (End Media)"); + sequenceNumber += getProperty("sequenceNumberIncrement"); +} + +// Added 6/14/21 | Gavin Williams | will1742 +// Issue 001 Input and Validation // Takes input from the user // Input: string prompt, will be displayed to users // char array options, capital letters accepted as input