Troubleshooting Invalid Syntax Issue in Studio 5000 View Designer for Property Definition

Question:

Greetings, I am a beginner in Studio 5000 View Designer and I am in the process of creating a reusable popup screen. I have designed a user-defined screen with two buttons (start and stop) that respond to the status of a BIT. The main page features two motor images that, when clicked, will trigger the popup screen. I am able to send the running property (e.g. motor1 or motor2) based on the selected motor. Within the popup screen, I have defined a property named "MotorStatus" with the data type ":LC.BOOL". However, I encountered an issue when attempting to add "MotorStatus==1" in the StateTable expression. The error message "Invalid syntax" is displayed, pointing to that particular expression. Although using a user-defined datatype resolves this issue, I am struggling to solely check a bit. Any assistance on this matter would be greatly appreciated. Thank you.

Top Replies

I apologize for my lack of recent experience with Rockwell HMI systems. If you are dealing with a Bool tag, I recommend trying to utilize the extended property "MotorStatus.@State1" as outlined in the Studio 5000 View Designer manual. This resource can be found at the following link: https://literature.rockwellautomation.com/idc/groups/literature/documents/um/9324-um001_-en-d.pdf. You may refer to page 517 for more information. I hope this suggestion proves to be useful for you.

Hello Olly, thank you for responding. Unfortunately, the solution does not seem to be effective. I am receiving two error messages, with one specifically related to inputting "CONFIRMATION" in the expression box. Thank you for your assistance.

It sounds like you're nearly there! The issue with the StateTable expression may lie in the invalid syntax. Because a BIT status is binary, you might want to consider using a syntax specific to binary operations. Try writing "MotorStatus==True" instead of "MotorStatus==1". Also, Studio 5000 View Designer reads a bit differently as compared to an integral data type. Assign the full tag path (e.g motor[motor_number]:OL) instead of just referring to the bit number. I hope this helps clarify the issue!

It seems that there's a minor syntax error in your expression. You should not be comparing the ":LC.BOOL" data type directly. Instead, create a variable of ":LC.BOOL" type that ties to your motor status, and compare that variable to 1 (for running) or 0 (for stopped). So if you defined a variable "varMotorStatus", your expression would be "varMotorStatus==1". This should get your logic to work properly.

More Replies →

Streamline Your Asset Management
See How Oxmaint Works!!

✅   Work Order Management

✅   Asset Tracking

✅   Preventive Maintenance

✅   Inspection Report

We have received your information. We will share Schedule Demo details on your Mail Id.

To add a comment, please sign in or register if you haven't already..   

Frequently Asked Questions (FAQ)

FAQ: 1. How can I resolve the "Invalid syntax" issue in Studio 5000 View Designer when trying to check a bit in a property expression?

Answer: Answer: To resolve the "Invalid syntax" issue when checking a bit in a property expression, consider using a user-defined datatype instead of directly checking the bit. This approach can help avoid syntax errors and ensure proper evaluation of the expression.

FAQ: 2. What is the recommended approach for defining properties in Studio 5000 View Designer when working with user-defined screens and properties?

Answer: Answer: When working with user-defined screens and properties in Studio 5000 View Designer, it is recommended to define properties using user-defined datatypes to ensure consistency and avoid syntax errors. This practice can help streamline the development process and prevent issues like the "Invalid syntax" error.

FAQ: 3. How can I troubleshoot issues related to property definitions and expressions in Studio 5000 View Designer?

Answer: Answer: When troubleshooting property definitions and expressions in Studio 5000 View Designer, consider checking the syntax of your expressions, ensuring proper data types are used, and verifying that property references are correctly implemented. If encountering errors like "Invalid syntax," review the expression structure and consider using user-defined datatypes for better clarity and error handling.

Ready to Simplify Maintenance?

Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.

Request Demo  â†’