Hello Guest it is April 19, 2024, 11:46:28 AM

Author Topic: Value of a MDI Control.  (Read 546 times)

0 Members and 1 Guest are viewing this topic.

Value of a MDI Control.
« on: December 06, 2019, 02:08:54 PM »
Is there a way to check the value of MDI such as checking to see if it is not_null. I have edited my load script to blink the Cycle Start button when there is code loaded and turn it solid when the cycle is started. Then the Cycle Start button blinks when the Feed Hold is pressed and the Feed Hold LED turns solid. I am very happy with all that but now the MDI just seems to have no functionality without being able to check its content and if there is any run my CycleStartBlinkButton() function. So the MDI can be included in my blinking LED logic.

Side note to make the buttons blink I have created three different images of each button.
1.) When Mach4 loads the default image is CycleStartMachineDisabled.png.
2.) When the machine is enabled I change the image to CyclStartMachineEnabled_Off_State.png.
3.) When the machine is enabled and the Cycle Start pushed the image changes to CyclStartMachineEnabled_On_State.png.

Reason I did this
It creates a triple state button.
I do not like the way Mach Renders a toggle buttons image but the bit mapped button image seems to be flawlessly rendered.