AdvancedHMI Software
General Category => Support Questions => Topic started by: khewes on June 06, 2016, 11:47:28 AM
-
hello all,
I was wondering if there were anyway to write values to my plc micrologix 1000 from the HMI using the advancedhmi software nad not my ladder logic?
For example, I want to set my timers to a specific time, and this time should be in the form of hrs:mm:ss. I would rather use advanced hmi math than ladder logic math because with an ML1000 my memory is very limited and thus every amount of space possible is very valuable.
-
okay i see that the digital panel meter is what i want to use. But i would like to change the keypad's layout and output so that a user can put in hrs:mm:ss, and have it converted to seconds only. How would I go about adding new buttons? I cannot seem to find where the keypad layout is constructed is it under keypad pop up for data entry?
-
You would have to write some VB code to do this. For instance:
- Add a TextBox to the form
- Add a Button to the form
- Double the button to get back to the code
- Add this code
Dim s() As String = TextBox1.Text.Split(":")
Dim TotalSeconds As Integer
'* Make sure 3 items were entered
If s.Length = 3 Then
Dim v As Double
If Double.TryParse(s(0), v) Then
TotalSeconds += v * 3600
End If
If Double.TryParse(s(1), v) Then
TotalSeconds += v * 60
End If
If Double.TryParse(s(2), v) Then
TotalSeconds += v
End If
EthernetIPforCLXCom1.Write("TagName",cstr(TotalSeconds))
End If