During the transition from RSView32 to FactoryTalk View SE, I encountered a challenge with the VB code embedded in the project. While transferring the code, I encountered an error that I couldn't resolve through online resources. Here is the excerpt of the code in question: Public Sub display_alan() Dim calculator_name As String 'Assign the tag calculator\Name to the string variable calculator_name' calculator_name = gTagdb.GetTag("calculator\Name").Value 'Utilize the string variable in the subsequent gettag equations to define the values for the calculator's temporary storage locations' On Error Resume Next 'SET CAL DISPLAY MIN VALUE gTagdb.GetTag("calculator\minvalue") = gTagdb.GetTag(calculator_name).MinimumValue On Error Resume Next 'SET CAL DISPLAY MAX VALUE gTagdb.GetTag("calculator\maxvalue") = gTagdb.GetTag(calculator_name).MaximumValue On Error Resume Next 'SET CALC DISPLAY CURRENT VALUE gTagdb.GetTag("calculator\valuetag") = gTagdb.GetTag(calculator_name).Value On Error Resume Next 'SET CALC DISPLAY DATA ENTRY VALUE gTagdb.GetTag("calculator\valuetag2") = gTagdb.GetTag(calculator_name).Value On Error Resume Next gCommand.Execute "display calc2" On Error Resume Next End Sub Upon attempting to run the code, an error message displays: "Compile Error: Variable not defined," specifically highlighting the "gTagdb" section. I suspect that "gTagdb" may not be the appropriate command for retrieving tag values into VB variables in FactoryTalk View SE, unlike in RSView32. Thus, I am curious about the equivalent of "gTagdb" in the context of FactoryTalk View SE.
Consider establishing a tag group to better organize your content for improved search engine optimization and user experience.
When considering organization in your HMI Tag database, it's beneficial to explore the concept of creating a taggroup. This feature may seem straightforward as it's essentially a grouping of tags, but its integration with folders in the database may be unclear. Is a taggroup synonymous with a folder, or does it serve a distinct purpose? As you navigate through this upgrade from RSView32, you may notice certain features have been eliminated and procedures have become more complex, leaving you feeling frustrated.
Before getting started, be sure to consult the help files for guidance. Begin by creating a tag group and then adding either HMI or direct tags to the group. It's important to note the various distinctions between SE and View32, particularly when it comes to VBA functionality. In View32, VBA runs on the server, whereas in SE, it operates on the client side. This difference has significant implications worth exploring.
Hello! Instead of using gTagdb.gettag, you can utilize TagDB.GetTag("TagName") for better performance. If you require further assistance, feel free to reach out to me.
Wahdan recommends using TagDB.GetTag("TagName") instead of gTagdb.gettag for better functionality. If you require further assistance, feel free to reach out. Unfortunately, despite 7 years of effort, he was ultimately let go due to inability to resolve the issue.
✅ Work Order Management
✅ Asset Tracking
✅ Preventive Maintenance
✅ Inspection Report
We have received your information. We will share Schedule Demo details on your Mail Id.
Answer: Answer: In FactoryTalk View SE, the equivalent to "gTagdb" for retrieving tag values into VB variables is typically "ApplicationMgr.TagName". This command allows you to access tag values within your VBA code.
Answer: Answer: The error message indicates that the variable "gTagdb" is not defined in the context of FactoryTalk View SE. To fix this issue, ensure you are using the correct command for accessing tag values, such as "ApplicationMgr.TagName", and declare the necessary variables at the beginning of your VBA script.
Answer: Answer: When transitioning VBA code from RSView32 to FactoryTalk View SE, review and update your code to align with the specific commands and syntax used in FactoryTalk View SE. Pay attention to differences in how tag values are accessed and manipulated in each system to prevent errors during code execution.
Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.