DIFD won't work ? help

Light

Member
Join Date
Sep 2010
Location
Doha
Posts
12
Good day

I'm practicing PLC programming so im starting with simple codes.
today i wrote a code in cx-programmer V9.0 , using CS1H, CPU67.
I'm having a problem with the diff.down, it should turn on but it just don't!
here's the program:

plc1.jpg


When the IR sensor turns on and then off the diff.down should turn on which will enable the timer, but that never happens ! the IR goes on and then off without enabling the DIFD....i can turn it On only by pressing Force-On which is totally unreliable....any1 knows what's the problem ?

tq
 
hmm...quit not sure if i got what u said... how is it possible to change that in order to turn DIFD On once the IR turns off continuously ?
 
What blubyu is saying is that the output bit of the DIFD command (201.01) will turn on for only one scan. Your monitor will probably never see it.

So let's review what you want. You want to know when the sensor has been on and has now turned off. The DIFD is an excellent choice. But you wish to continue to keep that fact but the DIFD is indicating that just once, not enough time for the timer to time out.

I see that you know about parallel logic on the input side of the rung. But from the little bit you show I'm not sure if you realize they can be used on the output (right side) of the rung. As well as turning on the timer also turn on another bit. I don't know your addressing, I'm sure you can choose a non-used one.

Now ALSO place a contact of that bit around 201.01 at the start of the rung. That will keep the timer on ('remembering' the fact (201.01) that the sensor turned off).

But now we have another problem. The timer will stay on forever! But as soon as the 'motor down' (10.04) turns on the timer has done its work. On the rung for the timer, after the joining of the DIFD contact (201.01) and the 'memory' contact (whatever you choose) place a normally closed of the 'motor down' (10.04). This will release the timer and the 'memory' bit as soon as the desired action - 'motor down' starts.
 
Bernie, excellent explanation!!


Light,
I would strongly recommend you download the programming manual for the CS1. It is manual number W340. It is about 1200 pages.

Hope this will help.
 
Last edited:
Don't waste your time with DIFU/DIFD instructions.
Use the differentiation properties of the contact.
Highlight the instruction.
Right click mouse.
Select "Edit".
Select "Detail".
At the bottom of the popup you can select the differentiation properties of the instruction. "None", "Up" or "Down".

This is one CX-One's many really cool features.
You can apply differentiation to almost any instruction [Input and Output], be sure check the manual for which ones accept this.
👨🏻‍🏫
 
@ bernie_carlton >> thank you for your precious explanation...but honestly i couldn't understand 80% of what you said....maybe pictures or diagrams will help.
@ gtsuport >> thank you i will refere to it when im lost.
@ BITS N BYTES >> that really helped it works...but not perfectly..it works when i connect it directly to the last rung and after deleting the DIFD and its contacts...i also had to delete the timer in order to make it switch on after the IR goes off...and i really dont know why!!
the picture below explains it:

plc2.jpg


after the IR sensor goes On as shown above...i deactivated the IR sensor which "SHOULD" activate the timer T0002...but that never happens...please tell me whats the problem.

thank you all
 
I don't know if I can do any better job than Bernie, but I will give it a shot. Maybe explaining it a different way will help.

A Differentiate Up or Down instruction only stays True for one PLC Scan. It can also be referred to as a One Shot Instruction.

The Differentiate Instruction in your original posting once triggered will stay True until the end of all the Ladder Rungs, and remain True from the beginning of the Ladder Rungs until it reaches the Rung that the Differentiate Instruction is on. Then it will go False, and stay False until the Triggering Condition, changes to False and then True again. This will re-trigger the Differentiate Instruction again for one PLC Scan.

Stu.....
 
You colud not use DIFD instruction (output is active for only ONE SCAN) to exitate a ON_DELAY timer; timer will never be ON.
 
I've understood everything now thanks to all of you!
now i've mixed what bernie_carlton and BITS N BYTES taught me...I've used the simple differentiation properties of the contact BITS N BYTES gave me...and the output control or "feedback control as i named it :) " from bernie_carlton. now it's working perfectly just the way i want it. here's the final diagram:

plc3.png


This program is made to control an automatic door of an industrial warehouse. the system depends on two sensors (Ultrasonic and IR-prox sensor) and two micro-switchs (door up and door down).
i solved the problem of the infinite timer (T0003) by placing the Normally closed LS down contact along with the feedback contact (cont) so whenever the gate opens up again the timer resets which solves everything.

I would like to thank everyone who helped me in this topic.
I want to be professional in plc programming...any advices ?

tq
 
Advice?
SAFETY FIRST:
It's very easy to make a program just to run a machine/facitlity. But, what if something goes wrong? This debugging section of a program must be at least large as a program itself.
THEN KNOWLEDGE
First learn how automation elements function (what is PNP, NPN, OC, NO, NC, what is 'sampling', how motor works...)
THEN COMMON SENSE
Never cut your bugdet if you think it will not work fine with restrictions 'they' want to make.
 
@ Homer_BL >> thank you for your precious advice...i will always remember them.
loool...i just needed a plc which can work on online simulation. CPM1A is more suitable but can't use simulation on it :)
thank you
 

Similar Topics

Hey all, I'm still new to PLC and I considered myself a quick learner so I wanna shoot straight; can someone help me to explain "in a very simple"...
Replies
10
Views
3,332
The code of Emergency switch is following, when you press the switch the machine stop. In ControlFunctions : DIFU and DIFD is same variable ...
Replies
4
Views
6,389
I have a managed InTouch Application that I deployed changes to through Archestra IDE yesterday. The only changes I made was adding a solenoid...
Replies
3
Views
93
Does anyone have any experience of using an ***** Flexy for remote programming/maintenance of a Codesys based controller? Rather than using the...
Replies
6
Views
229
So I'm pretty green when it comes to troubleshooting in the field so bear with me. We have a Danfoss valve that opens/closes from an analog output...
Replies
23
Views
957
Back
Top Bottom