06-21-2013 01:57 PM
I made a VI which controls relays for operating motors. I have 4 relays and they can either be operated manually or automatically by entering time. The VI compares present time with enterred one and turns the relay off.
I want a focus to create on string input for time for each relay whenever they are switched to automatic mode. By turning multiple relays to automatic mode, the key focus starts blinking and enters string at slow speed.
I have a basic VI attached. Help required.
Regards,
06-21-2013 03:13 PM
Your problem is your design.
If multiple controls are set to automatic then in each loop multiple focus events are generated (so the focus will switch between multiple controls).
You should be using an event structure to capture individual events and set focus accordingly...
Stripped down example you can work from:
06-22-2013 05:13 AM
Hi Philips,
I have another VI of same kind but with only two relays. Whenever we input something in any control, a check mark appears on the top left corner of front panel window indicating to update latest value. How I can use that pragmatically. I mean the user inputs time in string control and the press a small OK button for the changes to take affect.
Regards.
06-23-2013 03:05 PM
Sorry, I don't see the checkmark you are talking about. Can you explain what you actually want?
06-23-2013 07:39 PM - edited 06-23-2013 08:08 PM
His logic manipulates each enum shift-register individually based on each Relay functionality so I don't believe he could combine the two case structures into one per his current implementation.
NapDynamite - your logic seems to be incorrect if you're meaning to implement a timer in a relative HH:MM format rather than in absolute time. I changed some logic of your Relay1 to see if that's what you were intending to implement. Other gentlemen already seems to have answered about key focus.
I believe the green check mark you mentioned shows when your vi is changed (such as on the disk but loaded version is different) - but I couldn't say for sure unless if you take a snapshot and show it.
-DP
07-22-2013 06:36 AM
Sorry for late reply.
Refer to figure below. Whenever I update (type) something in this string control, or any other control, a check mark appears over the top left corner of the front panel indicating to update latest value.
How can I use this pragmatically. Or is there some basic programming technique I'm missing out? A help will be an opportunity for me to learn.
Regards.
07-22-2013 08:18 AM
07-22-2013 11:33 AM
@NapDynamite wrote:
Refer to figure below. Whenever I update (type) something in this string control, or any other control, a check mark appears over the top left corner of the front panel indicating to update latest value.How can I use this pragmatically. Or is there some basic programming technique I'm missing out? A help will be an opportunity for me to learn.
That checkmark is an edit time feature. In order to accept the new value, you could: