Timer function in VB
Timer function in VB
(OP)
I'm am in the process of creating an HMI using Basic.
I do have it up and running!
I'd like to add a function that will update the PLC every second or so.
OnTimer... I need to write to a PLC register automatically. I have never really employed timers in my code before (fairly new to this type of programming).
Can anyone provide a simple code example. I should be able to pick it up from there.
Thanks!!
I do have it up and running!
I'd like to add a function that will update the PLC every second or so.
OnTimer... I need to write to a PLC register automatically. I have never really employed timers in my code before (fairly new to this type of programming).
Can anyone provide a simple code example. I should be able to pick it up from there.
Thanks!!





RE: Timer function in VB
The Timer event will then fire every 1 sec (subject to other PC processes) until you set Enabled to False:
Private Sub Timer1_Timer()
' Your code goes here
End Sub
Good Luck
johnwm
________________________________________________________
To get the best from these forums read FAQ731-376 before posting