Dl06

ColinCarew

Member
Join Date
Dec 2012
Location
Castlegar
Posts
4
I have a DL06 with analog I/O cards and C-More touch panel controlling a servo motor. In my 'manual' mode the setpoint input works as it should and all scaling is OK. When switching to 'auto' mode I want the PLc to increase the speed of the motor by a given amount every 5 seconds. The program does the first increment and then seems to get stuck on the next scan. I have a counter that tracks the number of scans that I monitor in the 'Data View' feature and it increments every 5 seconds but still no increase in the servo speed. Also, if I increase the magnitude of the increment it will speed up on the first scan but gets 'stuck' on the second. Please help.

PS. I am new to PLC programming.
 
Here ya go. Thanks for having a look.

// Rung 1 Address 0 ANLGIN K0 K1 K8 K0 V400
// Rung 2 Address 38 ANLGOUT K0 K2 K8 K1 V420
// Rung 3 Address 74 STR SP1
BCDTORD V400 K0 V2000
BCDTORD V402 K0 V2002
BCDTORD V404 K0 V2004
BCDTORD V406 K0 V2006
BCDTORD V410 K0 V2010
BCDTORD V412 K0 V2012
BCDTORD V414 K0 V2014
// Rung 4 Address 642 STRN C1
LD V450
OUT V424
// Rung 5 Address 645 STR C1
ANDN T1
TMR T1 K50
// Rung 6 Address 650 STR C1
ANDPD T1
LDD V402
ADDD K5000
BIN
OUTD V424
INC V2400
End
 
When T1 expires, you add 5000 to V402. The problem is that V402 never changes, so the next time T1 expires, it adds 5000 to the SAME value as last time.

Assuming you want V402 to always be the starting value, use a different register to store the increasing value. I chose V3000-V3001 as this 'different register', but you can use whatever you want.

(Paste this code into a .txt file and then chose 'File-->Import-->Program' in DirectSOFT)
Code:
PLC 06

// Rung 1
// Address 0
ANLGIN K0 K1 K8 K0 V400

// Rung 2
// Address 38
ANLGOUT K0 K2 K8 K1 V420

// Rung 3
// Address 74
STR SP1
BCDTORD V400 K0 V2000
BCDTORD V402 K0 V2002
BCDTORD V404 K0 V2004
BCDTORD V406 K0 V2006
BCDTORD V410 K0 V2010
BCDTORD V412 K0 V2012
BCDTORD V414 K0 V2014

// Rung 4
// Address 642
STRN C1
LD V450
OUT V424

// Rung 5
// Address 645
STR C1
ANDN T1
TMR T1 K50

// Rung 6
// Address 650
STRPD C1
LDD V402
OUTD V3000

// Rung 7
// Address 653
STR C1
ANDPD T1
LDD V3000
ADDD K5000
OUTD V3000
BIN
OUTD V424
INC V2400

// Rung 8
// Address 663
END
I added an additional rung (rung 6) to move V402 to V3000. This resets V3000 to your starting value every time you switch to auto.

On rung 7 (your original rung 6), I used V3000 in place of V402, and added an additional OUTD instruction to overwrite V3000 with the sum of the addition. Now each time that rung executes, it will have the NEW value in V3000.

Let me know if this works... :oops:

🍻

-Eric
 
Last edited:
Thanks. I had another person give me the same advice. Any reason that V402 does this behavior since it is the real time input from the analog card? It does register an increase the first scan then craps out. Just trying to understand the way the machine 'thinks'? Thanks again.
 
Thanks. I had another person give me the same advice. Any reason that V402 does this behavior since it is the real time input from the analog card? It does register an increase the first scan then craps out. Just trying to understand the way the machine 'thinks'? Thanks again.
What is the analog in connected to? For that matter, what is the analog out connected to? You said servo motor, but what is this motor connected to? Remember, I can only 'see' what you tell me... ;)

Run your original program and watch the value of V402 while running in 'auto'. Does it increase? Based on your 'crapping out' result, I'm guessing that it's not. With your original program, the 'output' value will only be 5000 greater than the input each time T1 expires. If the input doesn't change, neither will the output.

🍻

-Eric
 
Tried your solution and it worked great. Thanks. As for your other questions, the analog cards are reading and feeding back through the original control boards for the servo motor. We have done a retro fit on an old control panel. After reading your fix I realized that your sequece of events go read,store,calculate where I was just reading and calculating. Since the analog card reads continuously and the program needs time to work maybe it is the timing of the system that I did not take into account?
 

Similar Topics

Hi, Mostly AB guy here with a little Koyo experience, but all of its digital. I get handed three analog I/O cards and asked to prove that they...
Replies
6
Views
500
Hi all, I am making a test rig to be able to wire in any DL06 (or DL05) And create a HMI in red lions crimson 3.1 to test all the inputs and...
Replies
4
Views
931
I have a Cmore screen which is communicating to the DL06 in BCD and need to create a timer that works in real numbers for a test, I simply need to...
Replies
3
Views
2,147
I have a client that has many Automation Direct DL06 PLCs for a municipal water/wastewater system. When there is a power outage, one of the sites...
Replies
4
Views
2,443
Hey everyone, Working on a system with a Koyo DL06 processor and it's my first experience with them. I have DirectSoft 6 and we got the program...
Replies
5
Views
2,335
Back
Top Bottom