Video: [https://www.youtube.com/watch?v=uQWDttzKuDA https://www.youtube.com/watch?v=uQWDttzKuDA]
{{#ev:youtube|uQWDttzKuDA}}
'''Features include:'''
Some more advanced features include input fields, C program actions, label DROs. Load the addition example in the screen editor. Example contains two user input controls and one DRO label control. The input edit controls are associated with KFLOP persist variables 160 and 161. The DRO label is associated with KFLOP persist variable 162. The Add button is configured for screen script action to run a C program in KFLOP. The C program is contained in the file “Add.c”. Test it by entering two values and pushing the Add button. Now open KMotion and look at the simple C code that is behind the function. (Open the file “Add.c”).
=====Momentary and Toggle button types in KMotion CNC Screen Editor=====
[https://www.youtube.com/watch?v=eE2mSUXxN2M https://www.youtube.com/watch?v=eE2mSUXxN2M]
{{#ev:youtube|eE2mSUXxN2M}}
Start KMotion CNC Screen Editor, and click on the “Main” tab, then on “Read Script” and choose the file named MomentaryToggle.scr
[[File:Momentary-button-2.png|none|link=]]
Clicking the Momentary button activates the bit; releasing it,deactivates it. Clicking the Toggle button once sets the bit; clicking it again releases it.
=====Combo Box Control with Drop Down Lists in KMotion CNC Screen Editor=====
[https://www.youtube.com/watch?v=Pp5DPfn8GLI https://www.youtube.com/watch?v=Pp5DPfn8GLI]
{{#ev:youtube|Pp5DPfn8GLI}}
Combo Box Controls allow the Operator to select text items from a list. The list items are specified as semicolon separated strings in the Text Property for the Control. Combo Boxes are read in the same Manner as Edit Controls where the Var Parameter of the Control is used to request the contents of the Control. When KMotionCNC detects a non-zero value of the persist variable it uses the value as an offset into the Gather Buffer and places the selected text into the Gather Buffer.
KFLOP also maintains an EditChangeCount value which is incremented each time any Edit or ComboBox Control changes. See the ComboBoxCopyToDROLabelwhenChangedUnicode.c Example.
ComboBox Selections made by the Operator are maintained from one KMotionCNC Session to the next using a Disk file:
\KMotion\Data\EditControlPersist.txt
=====Dual Button Types in KMotion CNC Screen Editor=====
[https://www.youtube.com/watch?v=8dAEeGnLaRg https://www.youtube.com/watch?v=8dAEeGnLaRg]
{{#ev:youtube|8dAEeGnLaRg}}
Certain buttons connected to internal status modes display one of 2 bitmaps depending on the state. Such as the Cycle Start Button displays either a Play image or a Halt image dependent on whether a Job is running. The 2 bitmaps can be reassigned to override the default images.
=====Instantaneous Feed Rate Display=====
[https://youtu.be/w-bKvqXCd0Q https://youtu.be/w-bKvqXCd0Q]
{{#ev:youtube|[https://youtu.be/w-bKvqXCd0Q w-bKvqXCd0Q]}}
Normally the feed rate indication in KMotionCNC shows ''average'' feed rate over 100ms, assuming straight line motion. Here we use a C program to calculate a more instantaneous rate and display it on the KMotionCNC screen using the KMotionCNC screen editor. Here the C program samples two positions and times, computes the delta position and the delta time, formats it to a string and displays it onto DRO label 162 in KMotionCNC and it performs this action roughly every one ½ seconds. Here is the screen script for the screen shown on the left, we’ve added a type DRO label in the screen editor, edited colors and it is connected to persist variable 162. This job consist of a rapid helix bore at a rate of about 6 revolutions per second. It shows the instant feed rate being more correct.
[https://youtu.be/VkBhYpyGpNU https://youtu.be/VkBhYpyGpNU]
{{#ev:youtube|VkBhYpyGpNU}}
=====Using Resizeable/Floating GViewer Control with Custom Screen=====
=====Maximized Captionless KMotionCNC Screens=====
[https://youtu.be/R44F0_upIoA https://youtu.be/R44F0_upIoA]
{{#ev:youtube|R44F0_upIoA}}
New option in KMotionCNC Screen Editor V4.34e allows screens to be maximized to full screen and with or without Window Frame/Title. New options in Screen Editor: turn minimum box on or off, maximum box on or off, resizing frame on or off. Caption on top can be present or absent.
* '''X, Y<br /> '''Changes the horizontal and vertical position of the control.
* '''Width, Height'''<br /> Changes the size of the control.
* '''Script'''<br /> Using this field, the user has three options:shown below.<br /><br />
Video demonstration of the creation of Screen Script to perform Windows Messages
{{#ev:youtube|9x4JTswwWvk}}
=====Control Script Options=====
a) Selecting a screen script file from the library:
Note: any bitmap images will be unchanged and remain the same size. They can be manually scaled with a graphics app if necessary.
If not in the current Version a Version with scaling added can be downloaded here (place in \KMotion\Release Directory):
[http://dynomotion.com/Software/Patch/ScreenEditorWithScaling_V434j/KMotionCNCScreenEditor.exe KMotionCNC Screen Editor with Scaling]
[[File:ScreenScale160.png|none|link=|879x641px]]
=====Hierarchical Sub Script Files=====
When creating multiple Screens with sections of Controls that are duplicated among screens, possibly re-positioned on the Screen, it is useful to make use of SubScript files. Selecting one or more Controls and setting a SubScript file name for them will move them to a separate file which will then be referenced from the main file. SubScript files can also reference SubScript files in a hierarchical manner.
See this Video Demonstration
{{#ev:youtube|bWToNV6922s}}