I'm working on a recipe page which is my first real attempt at VBA, this is our only system that uses RSView32 and it's pretty much brand new so in-house experience is nill. I'm takin' baby steps here
Currently I've created a screen that I want to display all 30 recipe parameters. Overall I have everything sorted out, but I have extremely slow upload speeds. I have an "upload" button that when pressed will upload the current recipe values in the system for display on the HMI. This will put those values into textboxes for editing purposes (I can also save my recipes from this screen)
Here is a slice of my code:
Dim Zn1Temp As Tag 'Tag variables
Dim Zn2Temp As Tag
Dim Zn3Temp As Tag
Dim Zn4Temp As Tag
MsgBox("Variable decs made") 'debug
Set Zn1Temp = gTagDb.GetTag("ANALOG\Skid1_temp_stpt") 'Set tagnames to variables
Set Zn2Temp = gTagDb.GetTag("ANALOG\Skid2_temp_stpt")
Set Zn3Temp = gTagDb.GetTag("ANALOG\Skid3_temp_stpt")
Set Zn4Temp = gTagDb.GetTag("ANALOG\Skid4_temp_stpt")
MsgBox("Tags set") 'debug
UserForm1.Zn1Temp = Zn1Temp 'The problem lies in this area
UserForm1.Zn2Temp = Zn2Temp
UserForm1.Zn3Temp = Zn3Temp
UserForm1.Zn4Temp = Zn4Temp
MsgBox("Load Complete") 'debug
I'm attempting to write directly to the textboxes on my form for display, but this is what is very slow. Is this the right way to do this? Am I missing some textbox setting I need to be aware of? Could this be related to the data type of the tags VS the textboxes?
I've been looking through my VB reference book, but since it's for VB not VBA I'm guessing I'm overlooking something. Google and PLCS search haven't come up with much. Can anyone point me in the right direction?
Currently I've created a screen that I want to display all 30 recipe parameters. Overall I have everything sorted out, but I have extremely slow upload speeds. I have an "upload" button that when pressed will upload the current recipe values in the system for display on the HMI. This will put those values into textboxes for editing purposes (I can also save my recipes from this screen)
Here is a slice of my code:
Dim Zn1Temp As Tag 'Tag variables
Dim Zn2Temp As Tag
Dim Zn3Temp As Tag
Dim Zn4Temp As Tag
MsgBox("Variable decs made") 'debug
Set Zn1Temp = gTagDb.GetTag("ANALOG\Skid1_temp_stpt") 'Set tagnames to variables
Set Zn2Temp = gTagDb.GetTag("ANALOG\Skid2_temp_stpt")
Set Zn3Temp = gTagDb.GetTag("ANALOG\Skid3_temp_stpt")
Set Zn4Temp = gTagDb.GetTag("ANALOG\Skid4_temp_stpt")
MsgBox("Tags set") 'debug
UserForm1.Zn1Temp = Zn1Temp 'The problem lies in this area
UserForm1.Zn2Temp = Zn2Temp
UserForm1.Zn3Temp = Zn3Temp
UserForm1.Zn4Temp = Zn4Temp
MsgBox("Load Complete") 'debug
I'm attempting to write directly to the textboxes on my form for display, but this is what is very slow. Is this the right way to do this? Am I missing some textbox setting I need to be aware of? Could this be related to the data type of the tags VS the textboxes?
I've been looking through my VB reference book, but since it's for VB not VBA I'm guessing I'm overlooking something. Google and PLCS search haven't come up with much. Can anyone point me in the right direction?