Micrologix1500 can i vary an output voltage from a prox?

Dorrance

Member
Join Date
Feb 2012
Location
Michigan
Posts
39
Hello again
I am working on a roller that needs to change speed when the machine changes. The roller is driven with a 90Vdc motor and currently I am using a kbic board. I came up with a tach generator, signal isolator, and drive board. (Only as a prototype) I am unsure why my boss didn’t like this idea but I get some more OTJT. So what I would like to do exactly is use a prox to read a roller and have the PLC take the speed of that prox and calculate an output of 0 to 10 volts.
All help will be appreciated
:unsure:
 
This can get tricky.
You can go two different routes. One is to bring the sensor into a high speed input and base it off frequency. The other is to measure the time between pulses. Frequency works well for fast processes and "time measurement" is better for slow ones. Response will be a factor as well. For a "time measurement" you will basically be taking the average of the speed between pulses. You won't be able to detect instantaneous speed changes.

In order to give you optimal advise you should give us an idea of the following.

How many pulses you are picking up per rev of whatever you are reading?
What is the fastest RPM you will see on the roller you are picking the pulses on?
What is the slowest RPM you will see on the roller you are picking the pulses on?
What is your sensor? NPN/PNP On time, OFF time?
Is there a fast input available to bring it into?
What is the scan time of the PLC with the code as it already is?
 
In addition to Damien's good advice. Red Lion, Omega Engineering, and I am sure others, make Plug and Play solutions to your problem. I am not trying to dissuade you from trying to do it in the PLC, but if it becomes to much of a hassle, they are an option.

Stu....
 
I recently wrote my first ML1500 program having millisecond timers available in a SLC. it is very very fast. I would definitely take advantage of the built in HSC features for even a slow turning application. Better still would be a frequency to voltage converter purpose built. I use Wilkerson Instruments with excellent results, but connect them to a tach or encoder. Pass its analog output through a PLC if you need to do other things like match speeds or limit ramp rates set ranges, dynamic upper and lower limits, etc.

The prox switch thingy can fool you, cause big step change in calculated frequency exaggerated at lower speeds, fail to determine direction...If those factors are of no concern, then tell us the frequency of the prox. switch (limit) and I betcha' the ML1500 is way fast enough.

My bag inserter machine runs in under 2ms with quite a bit of control, indirect addressing, and HMI stuff going on.
 
Last edited:
I’m sorry that I’m not that great at this site so please bear with me.
In response to Danian’s questions
"How many pulses you are picking up per rev of whatever you are reading?
What is the fastest RPM you will see on the roller you are picking the pulses on?
What is the slowest RPM you will see on the roller you are picking the pulses on?
What is your sensor? NPN/PNP On time, OFF time?
Is there a fast input available to bring it into?
What is the scan time of the PLC with the code as it already is?"
1 I will be picking up 4 pulses per revelation.
2 the fastest I will be running is 1200 FPM the slowest is 110 FPM.
3 my sensor is PNP and will be off except 4 times per revolution.
4 the PLC I have does have a fast input I’m not sure the scan time.
In addition I have a Micrologix 1500 processor 1764-LSP, base 1764-24BWA, and analog output card 1769-OF2. I believe this will work
 
pleaase clarify the actual maximum Shaft RPM that your Prox. will be reading.
FPM conversion can only be used with the known diameter of the roller.
the reason is to understand how many pulses will be seen per second (HZ)
this will let us know whether you can do what you want to with a standard PLC.

This is a common applicaion - easy to setup - BUT - needs carefull design considerations
 
In addition to the Diameter Ian points out, you should still still give us the part number of the prox so that we can see the ON/OFF times. What I had meant by that was the prox will have a spec for how quickly it can operate. It will have a minimum time it takes to go from OFF to ON and vise versa.

Also, are you indicating that this is a new application and that the ML1500 isn't already being used for something else?
 
Sorry about the misinformation the max shaft speed is 1145 RPM and min is 105 RPM. The prox I will use said switching frequency 0…3000 HZ. Is this the rite info? If not the prox # is NBB2-8GM30-E2 it is made by Pepperl+Fuchs.
Also this is a new project the PLC I have is not in use. I know there are different ways to go about what I am trying to achieve, but I like working on PLC’s and with this site I have been able to do more with programming than I ever learned in school. So thank you guys for helping me out.
Quick background into what I am doing is, I am working on a web press that prints newspaper inserts. They run silicone on the web toward the end of the process. It is not that critical that it be perfect. It had a 20 year old system in it and just wasn’t working properly so I added a KBIC drive they liked it but want it to ramp up and down with the speeds of the press.
 
First lets math it out.
1145 RPM / (60 sec/min) = 19.083 Rev/Sec
@ 1 pulse per rev gives 0.052 secs from pulse to pulse
@ 4 pulse per rev gives 0.013 secs from pulse to pulse
So on the fast end you need to be scanning fast enough not to miss a 13ms event.

105 RPM / (60 sec/min) = 1.75 Rev/sec
@ 1 pulse / rev gives 0.571 secs from pulse to pulse
@ 4 pulse / red gives 0.143 secs from pulse to pulse
So your response will be limited to essentially a 150ms sampling rate of the speed at the slow end.

I would say it is a very promising setup. All should be perfectly fine to perform with traditional ladder coding. You might even consider going to two pulses/rev because it will make inaccuracies associated with the scan time less of a percentage of your value.

I would definitely use the "time measurement" method.
I would still bring your prox into one of the high speed inputs though.

The 3000 Hz spec on the prox is good, so no worries there.
I would not trust using a timer for this.
The better bet is to use the free running clock (S:4).
I don't remember if you can do an interupt driven subroutine with the ML1500, but if you can that would be optimal.

Create three registers
N:OLD_VALUE, N:NEW_VALUE and N:period
Every time you see a positive transition of the prox first move N:NEW_VALUE into N:OLD_VALUE and then move S:4 into N:NEW_VALUE.
Then subtract N:OLD_VALUE from N:NEW_VALUE and this will give you the time seen between pulses in units of 0.0001 seconds.

Then, it is just a matter of math.
You will have to decide whether you care to convert back to RPM for debug purposes, or convert directly to your voltage output signal.

We know that at 4 pulses per rev your 1145 RPM will give 0.013secs.
This corresponds to roughly 130 counts of N:period.

We know that at 7 pulses per rev your 105 RPM will give 0.143secs.
This corresponds to rouhgly 1430 counts of N:period.

So now use the scale function block SCL to convert that to whatever your analog out value counts are. Probably 0 to 32767 counts.
Then that number can be fed into whatever the output O:X file register is for that channel you are using.

CONSIDERATIONS:

If conventient make the flag you are picking up create a 50% duty cycle with the prox.

Make the flag you are picking up very consistent. Since you are measuring time between pulses, any error in angle from one "knob" to the next will be seen as a speed fluctuation by the prox.

The "knobs" obviously have to be big enough that they stay on long enough for the PLC to see the pulse.

You will need some extra code to ingore the times when the OLD value is larger than the NEW value.

You will want some extra code to handle what happens when things are not running at the "minimum" speed you specified.

You will want some extra code to check that values are within valid ranges.

You will want a "watchdog timer" to monitor the prox to make sure when you are at a high speed that if you all of the sudden stop seeing prox pulses you recognize there is something wrong with the prox pickup system and bring the speed back down forcibly.

Depending on your down stream equipment, you may also consider adding slew/ramping to your output signal as opposed to just stuffing the number directly into your voltage output.

Good luck.
 
Damian thanks for all your help. I see you have mapped me out a plan and I’m sure is probably a good one. I am really new to programming and also self taught. I rally didn’t understand most of what you were trying to show me. Sorry PLC programming has been something I have been wanting to learn a long time. I am at a company that has all the AB software and no one that knows how to use it. But they don’t mind me learning on the job.
This is the first time I ever attempted to use an analog card. I have multiple sets of instructions in front of me. But still confused I learn quickly but I am having trouble grasping the analog card.
So far I have just tried to get an output from the analog card but had no success. I can see on my laptop when the output comes on but I am only using a simple examine if closed and a output energize. Not sure if this is enough info. I did go into my advanced configuration and enable the channel I am trying to use, I set it to 0to+10V, and raw/proportional.
If someone has a more simplified version it would really help like I said I am a beginner.
 
Which Analog Output Card are you using for this Project?

Analog Card are controlled by Numbers, not Output Coils.

They vary, but lets say for 0-10VDC it is 0-31280.

You have to Move (MOV) a number say from N7:0 to the Analog Output Channel.

So, if you move 15640 (Half of 31280) to the Analog Output Channel, you should get 5VDC on the Channel Output Terminals.

Stu....
 
Thank you to everyone that has helped. I have got a little going as far as the analog card but think I have more questions than answers. I won’t be working on it for the next couple days but will surly need more help when I do get back to it. You guys have been a great help so once again thank you.
 
That's alright. Just bite off one bit at a time. This is actually a good learning project. Tell us exactly what ML1500 part number you are using so we know your IO setup. Or beeter yet attach your program file here. What version of RSLogix500 are you using?
 
Instead of installing prox and working that in program.....find an analog output maybe from Main drive and bring that to analog input and SCP in the 1500 to get desired output. There should plenty analog signals around the press, eg: the units, the registry, cutoff etc....this will be much easier it will follow press speed!
 
Ok I’m trying to attach a word doc of what I have so far. You guys might laugh and that’s ok I haven’t got very far. Rung 1 is the only line I have but it does give me voltage to my output on my analog card. But once I trigger my input 1 the voltage to my output stays never goes away. I don’t fully understand yet the rungs 2&3 were me playing trying to shut off the output. They are not complete I tried several different things but just left them there.View attachment Doc1.doc
 

Similar Topics

Hello everyone I have a micrologix1500 connected with RS232 to my computer, and connected to the 1761-net-dni with a series connexion from the...
Replies
4
Views
2,925
Hello Everyone, Let me start out by saying I am definitely not a pro by any stretch of the imagination. What I have is a Micro850 that is on the...
Replies
2
Views
2,696
Okay so I just went into my ML1500 and mistakenly changed a comm setting for channel 0 or 1 channel config section of the programming software...
Replies
2
Views
1,173
Hi, I have a Micrologix PLC 1500 on which channel 0 is free. I need to take this PLC in scada via ethernet module any one can suggest a suitable...
Replies
1
Views
1,507
Greetings! One of my shop's Micrologix 1500 processor's mode selector switch(soldered on the PCB) has broken off. Currently, it is stuck in RUN...
Replies
2
Views
2,331
Back
Top Bottom