Analog trim with SLC500

ToddM

Member
Join Date
Oct 2004
Location
Cascade Va.
Posts
106
Hi folks
I'm expierementing with an analog trim program that I would like to try on some of our nappers {Thats the machine that puts the fuzzy side on your sweat shirts} We run 2 of these machines in tandem to get a better finish on the cloth. The only part I'm concerned with right now is the cloth drive part.As the cloth exits the master machine it loops down and runs over to the machine either across or right beside it {depending on where it is in our plant right now.}What I'm wanting to do is control the loop between the machines. I wrote a chunk of code that worked OK on RS emulate, but didn't work too cool when I tried it on my test PLC at work.I get a math over run error. I know why but I'm not quite sure If I'm heading in the right direction. Here's what I've written so far
Test0001.jpg

test002.jpg

I:1.0 is the reference from the master or "A" machine. I:1.1 is the reference from a Senix ultra sonic sensor located between the 2 machines.I put B3:0/0 in just as a block to cut off the actual trim part. The 8030 in the source b of the LES and GRT statements was the mid point between the distance I had my senix reading. I don't want anyone to write the code for me just tell me if I'm heading in the right direction or at least point me there. I wouldn't mind seeing how someone else has done this , if they have some sample code already written.{In other words I want to understand it rather than just stick a chunk of someone elses code in there} I hope I have included enough information.
Thanks in advance... Todd
 
First problem: you're adjusting N7:0. I think you want to trim N7:1
Second problem: the trim adjustment will increase or decrease at the SLC's scan rate, which is most likely a whole lot faster than the response of your process.
Third problem: there's no deadband

I predict that the system will hunt wildly.

I suggest you investigate the PID instruction.
 
Try using another PID block as a tension controller, use the sensor position as your PV and put CV to the bias value of the PID block controlling the slave motor speed. SP will be the sensor mid position. Set the limits on the PID block to only allow as much fast/slow trimming as you need. You will need to offset the slave speed signal so that the output of the tension PID block is always positive.

This is just an idea, I have seen it done on a series of conveyors using DC drives and PID controllers but I have not actually done it in a SLC 500.
 
Let me say the same thing the other guys are saying but a different way. When N7:2 is less than 8030 the SLC will ADD 1 to N7:0 every scan! Will not take very long before you run out of register. If you dont want to do a PID block you are going to have to look at the how long the N7:2 has been less than 8030 then make an adjustment to N7:0. You will have to do the same thing to the GRT block also. Basically you will be rolling your own PI block. Might as well use the built in PID function. Might be good practice though...
 
About the math error.

I notice that Todd uses a rate of 32767. That can cause an overflow if the input value from the analog card is greater than 10000.
The raw analog value from most SLC500 analog inputs can easily exceed this limit.

This is from the online help:
"If the result of the Source times the Rate, divided by 10,000 is greater than 32767, the SCL instruction overflows, causing error 0020 (minor error bit) and places 32767 in the Destination"

Todd may consider using some floating point math and/or using the SCP instruction if his processor supports it.
 
Thanks a lot!!!

Gerry,JohnW,bwheat,and JesperMP....Thanks a lot guys. I believe with a little reasearch into the PID block I can do something here.You guys rock!!! Ain't modern technology great?

Todd
 

Similar Topics

i had previously posted asking if anyone has ever used a analog type sensor as a trim type dancer for the line speed of a AC drive. I got some...
Replies
8
Views
5,453
anyone have a idea on who makes a laser type analog output sensor that could be used to detect the position of fabric and trim a AC drive...
Replies
10
Views
2,771
Hello, I am looking into using the Micrologix 1100 to control our facilities compressors in a lead/lag configuration and to keep them off when...
Replies
11
Views
10,200
Good afternoon, I am currently working with an HMI/PLC LP-a070 and I require at least one analog output, but the PLC does not have one. I was...
Replies
5
Views
109
Hi all. Customer wants analog faceplates really bad, even if we explained that it doesn't make much sense in his process. What he wants to see...
Replies
5
Views
110
Back
Top Bottom