Example ====== Stopwatch/Flash Playback ====== ^ by: | Sebastian Beutel, March 2020 | ^ published: | here | ^ description: | flashes a playback and stopwatches the time this is activated | ^ remarks: | idea: https://www.facebook.com/groups/1811437589141428/permalink/2606214156330430/ \\ use this to stopwatch the time a CO2 jet is activated \\ see also [[macros:example:timecodestartstop|]]| {{tag>timecode start stop stopwatch flash}} ==== functions ==== * [[:macros:function:Playbacks.FlashPlayback]] * [[:macros:function:Timecode.TimecodeOne.Play]] * [[:macros:function:Playbacks.ClearFlashPlayback]] * [[:macros:function:Timecode.TimecodeOne.Pause]] ==== specials ==== * [[:macros:xml_file_format#lines_5_through_8|start/end notation]] ===== Code ===== Stopwatch Timecode 1 with PB900 flash Playbacks.FlashPlayback("cueHandleUN=900") Timecode.TimecodeOne.Play() Playbacks.ClearFlashPlayback("cueHandleUN=900") Timecode.TimecodeOne.Pause() ===== Explanation ===== This explains the functional steps within the sequence. For all the other XML details please refer to [[:macros:formats_and_syntax#xml_format|Formats and syntax]] This macro sports separate actions when being clicked/pressed and when being released. When the macro button/key is pressed the sequence is performed: * ''Playbacks.FlashPlayback("cueHandleUN=900")'' flashes a particular playback * ''Timecode.TimecodeOne.Play()'' makes a particular timecode run When the macro button/key is released the sequence is performed: * ''Playbacks.ClearFlashPlayback("cueHandleUN=900")'' un-flashes the playback which was previously flashed * ''Timecode.TimecodeOne.Pause()'' pauses the timecode ===== How to use it ===== * [[:macros:deploying|make this macro available]]. **This macro needs to be __moved__** to a handle, e.g. to a hardware button (executor). **Copying the macro does not work.** * record a playback with the action you want to stopwatch, e.g. with your CO2 jet @ 100%. **Give this playback the user number 900.** * you can even unassign this playback, or move it to a page which is safe from being hit by accident Now, while this macro is activated, the timecode runs and the playback is being flashed. Further hints: * this can only be some measure for you. Please don't use this for any items which are safety-relevant * the internal timecode can easily be reset. Please make sure this particular timecode is only used for this stopwatch thing (you might change ''Timecode.TimecodeOne'' for e.g. ''Timecode.TimecodeFour''in order to use another timecode). Also make sure the timecode you use is set to be internal as play/pause will not work on all timecode sources or will have unexpected results. ~~DISCUSSION~~