How to program a falling edge in a wave microcontroller using CWDesigner

Question:

Hello everyone, I need assistance with programming a falling edge in a wave microcontroller using CWDesigner to reset a protection device connected to a digital input. Any guidance would be greatly appreciated. Thank you in advance!

Top Replies

Utilize the FTrig function for a falling edge trigger effect - when a tag switches from true to false, FTRIG produces a pulse for one scan. This feature can be found in the manual for easy reference.

I greatly appreciate your suggestion and will definitely give it a try. Thank you!

Hi there! I'm glad you're reaching out for help about this. In situations like yours, you'd want to make use of an interrupt. In CWDesigner, the falling edge is typically handled with a Negative Edge triggered interrupt. This interrupt discerns when the input signal switches from high to low, hence the "falling edge". Now, to reset your protection device, you'd put a code in the interrupt handler subroutine to achieve this. Make sure to double-check your microcontroller's documentation because the specifics can vary depending on the model you're using. I hope this helps steer you in the right direction!

Hi there! In CWDesigner, a falling edge could be programmed by firing off your reset cycle whenever a transition from high to low is detected on a specific port pin. In essence, you need to continuously monitor the state of the pin, save that value, and perform a check on change. If a high to low transition is detected, initiate the reset process for the protection device. It's a little tricky at first, but a control loop comparing previous pin state to current can do the trick. You might want to enable the internal pull-up resistor as well for more reliable detection. I hope this guides you in the right direction.

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: FAQs:

Answer: 1. How can I program a falling edge in a wave microcontroller using CWDesigner? - To program a falling edge in a wave microcontroller using CWDesigner, you can typically utilize interrupts or timers to detect the falling edge and trigger the necessary action, such as resetting a protection device connected to a digital input.

FAQ: 2. What is CWDesigner and how does it relate to programming falling edges in a microcontroller?

Answer: - CWDesigner is a software tool commonly used for designing and programming microcontroller applications. In the context of programming falling edges, CWDesigner can provide the necessary features and functionalities to detect and respond to falling edges in a wave microcontroller.

FAQ: 3. Can you provide step-by-step instructions on how to implement a falling edge in a wave microcontroller using CWDesigner?

Answer: - While specific implementation steps may vary based on the microcontroller model and programming language, a general approach would involve configuring the microcontroller's input/output settings, setting up interrupt or timer routines to detect falling edges, and programming the desired action to be taken upon detecting the falling edge. Consulting the microcontroller's datasheet and CWDesigner documentation can provide detailed guidance on implementation.

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