Beginners Guide to Setting Variables to Constants with Functional Block Diagrams (FBD) in CCW

Question:

As a beginner in CCW programming, I am interested in learning how to use Functional Block Diagram (FBD) language for setting a variable to a constant when a contact is closed. Can you provide guidance on this process? Additionally, I am looking for a detailed tutorial on utilizing FBD within CCW. Where can I find such information?

Top Replies

The Rube-Goldbergs and Heath-Robinsons methods may suffice, yet it is essential to find a more efficient approach. It should be possible to activate the EN/ENO input/output of an instruction block. However, in my version of CCW, this feature is only available in ladder logic.

According to this referenced Rockwell Automation Knowledge Base article, a user-defined function block (UDFB) can be created with CCW 20.01 or later. The KB article ID is QA64950 and is accessible to all users. The article discusses the MOV instruction in FBD language. For more information, visit the link: https://rockwellautomation.custhelp.com/app/answers/answer_view/a_id/1137173/loc/en_US#__highlight.

Consider implementing this solution for your specific needs and modifying it as necessary for different data types. Create a custom function block named SelectReals, written in Structured Text (ST). Here is the code snippet: IF Select THEN Output := SelectOn; ELSE Output := SelectOff; END_IF; The local variables needed for this function block are: Select (BOOL), VarInputSelectOff (Real), VarInputSelectOn (Real), VarInputOutput (Real), VarOutput. This function will be included in the drop-down list for selecting instruction blocks.

Is it feasible to create a conditional MOV instruction in FBD programming language? Regrettably, it is not achievable. While there are workarounds like the Rube-Goldbergs/Heath-Robinsons methods mentioned, there must be a more efficient approach. As the saying goes, we tackle the impossible immediately, but the challenging tasks may require a bit more time.

In a post by drbitboy on a popular forum, he humorously mentioned the challenges of working with PLC programming, emphasizing the importance of visuals in understanding complex concepts like CCW UDFB for MOV instruction. While RA provides helpful images in ladder logic format, some users may prefer seeing it in Function Block Diagram (FBD) format for easier comprehension.

I'm glad to hear you're keen on learning FBD in CCW! It's indeed a powerful tool. For the first part of your question, you'd have to create a FBD program where a contact (e.g., a button input) directly sets a variable when closed. You can use a MOVE function block for this, which sets the destination to the value of the source whenever it's enabled. As for your second question, the Rockwell Automation website includes a comprehensive guide on FBD programming within CCW. If you prefer video tutorials, YouTube also has a great set of them--just search "FBD programming in CCW". Remember, practice is key, so don't be discouraged if it seems challenging at first!

It's great that you're keen on learning more about FBD language! In the context of your question, you could use an SET-RESET block for setting a variable to a constant when a contact is closed. An 'SR' block as it's usually called, once triggered through its S input, sets the output to ON and it stays that way even if the S trigger is gone, it only resets (off) when the R input is triggered. The specific constant value could be entered in the input node. As for tutorials, you can find some really helpful ones on the official Rockwell Automation website or on sites like PLC Academy and My PLC Training. Be sure to look for beginner's guides and step-by-step walkthroughs. PlantPAx tutorials would be a fantastic place to start if you're into process automation. Best of luck with your study!

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 set a variable to a constant in CCW using Functional Block Diagrams (FBD) when a contact is closed?

Answer: - To set a variable to a constant in CCW using FBD when a contact is closed, you can utilize the appropriate function block and connect it to the contact's input. By configuring the function block parameters, you can assign a constant value to the variable when the contact is closed.

FAQ: 2. Where can I find a detailed tutorial on using Functional Block Diagrams (FBD) in CCW?

Answer: - You can find detailed tutorials on utilizing Functional Block Diagrams (FBD) within CCW by referring to the official documentation provided by the manufacturer. Additionally, online resources, forums, and video tutorials can also be valuable sources of information for learning FBD programming in CCW.

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  â†’