I am back project time again

blueyedpeter

Lifetime Supporting Member
Join Date
Sep 2011
Location
sydney
Posts
57
May i start with good morning noon and night

Yes i am back on the project again i am attempting to get a little more involved in programming.

I must admit that hard wiring is a little more common sense for me than programming .

So here is my problem its more about connecting the dots , if i were to say i had two inputs one is driven and would have a count rate no more than 130 beats a minuet and the other a count rate of no more than 500 beats a minuet . Now both inputs will be used to determine many things , so lets start with the speed of input two the 500 count input.

What i need is it explained for a dummy.

The ratio of the beats to each other will change at different gear ratios , but that's not important now getting a speed reference stored into a register and getting it updated for accuracy about every 2 seconds is .

The plc will probably be an rs500 5/03 with numerous cards but for simplicity i would like to keep it to bit logic , get and understanding of the hardware and number crunching and then use a counter card later.

For simplicity any examples of code would help and or any descriptions will greatly broaden my knowledge base on this subject thanks again for any help you might offer cheers peter
 
Hi mate - Can you look at what you have written please.
I am having dificulties in understanding.
.....
you have two inputs
1 @ 130 pulses per minute or 2 pulses per second
2 @ 500 pulses per minute or 8 pulses per second
....
You want to calculate the ratio
130 / 500 or vica verca 500/130
....
Is that correct?
 
500/minute = 8.33 per second, or 8 ons and 8 offs every second. The first thing you will need is a SLC 5/03 Input that can switch on and off that fast.
 
I was trying to give a very slight over view without going into to much detail .
The project revolves around a plc controled exercise bike .

You pedal at a cadence of around max 130 rev/per min and the back wheel spins at a rate aoround 416 reves/per min.

This all equals around 55km/hr this is a pivital base for every other measurement that is going to happen after this point.

At a later stage i will introduce load to the system through a load device it works much like a magnetic dyno that will load up the back wheel and make the effort a lot harder.

So it all starts at speed measurement of the back wheel once i climb that mountain then i will move on .

And i have only two plc that are allen bradley , one is a micrologic 1000 and i think they only have i high speed counter input , and that is input 0 and even with the input filter set at i think the smallest scan time is 8 micro seconds the slower input might work on input 1 as well.
Or
The other plc is a rs500 5/03 plc it has all the cards with it an analog input card a high speed counter card it looks like to be the better choice .

The code writeing is where i am weakest most of my plc projects resemble a hard wired equivelant so i am trying not to introduce to many extra hard wired devices and at the same time inprove my code writeing skills .
hope this helps
 
;)yes you are correct
But i have seen a micrologic 1100 plc run and encoder on inputs 0 and input 1 and we are talking 1000 pulses per rev at a resolution of around one rev per second which equals around 85 mm per second that is just over 1.2 revs per second times 1000 pulses per second the filters on each input are are setable to a fairly small time frame like 8 micro seconds .
Which might cover some applications but not all.
 
500/minute = 8.33 per second, or 8 ons and 8 offs every second. The first thing you will need is a SLC 5/03 Input that can switch on and off that fast.
Basically i am talking about speed measurement forget the ratio part and i am talking about the faster input the back wheel which rotates at around maximum 416 to 460 rpm.

Now i know that distance traveled over time = speed but i am unsure as to how i will write the code and store it in a N7 register , and i will need to up date this accurately so about every 2 seconds it needs an update .

Every equation or measured result will come from these two inputs but the very first step will be to measure speed and convert that into every other measurement.
 
this is not a ratio - it is a calculation to be aware of for scaling.
It is also needed to understand if the input can handle the frequency of pulses. (hertz)= Pulses per second
each Pulse is eqivalent to so many meters or fractions of .. etc.
After this you can use time to work out your KM/H etc.
 
But i have seen a micrologic 1100 plc run and encoder on inputs 0 and input 1. . .
Yes, for the Micrologix 1100, if need be you can use the High Speed Counter function to count pulses (up to 20,000 cycles per second) on Inputs 0 to 3.
 
Last edited:
the project

I think that i have not properly represented my problem , where i am having problems is with the code writing.
Some one suggested a free running clock with an up counter.
And i don't think there was a timer involved though , the destination would be the n7 register at the end there was a reset in there somewhere , as i recall the resolution was a little poor as the reset was based on the count rate , so i needed to improve or get a better understanding of how the speed value will be generated and calibrated . Or i might need to rethink on how to connect the dots together.

I think when the count rate controls the update period at a count rate of 416 rpm it is not fast enough to update regularly enough .
So a time based update period might be better, so it comes down to code writing skills , which can only get better.

I am aware that to monitor anything there are what in the equation what might be as considered variables and constants, in this monitoring equation just about everything is variable but the two constants i have will be the two inputs which are mechanically connected to each other , but the time separation between each other will vary through gear ratios .

Getting back to the very first question speed measurement and the code that is required to monitor a single input at a maximum of 450 rpm i think from memory the lowest rate is 15rpm the maths will translate that eventually into about 6km/hr to about 55km/hr.
In the end any advise about writeing code around the idea of speed monitoring would be of a great assistance i will work on the hardware selection my self and thanks again. cheers peter
 
I think part of the problem will be your update or refresh rate. If you use the wheel sensor as the input of a high speed counter, you can count 'distance'. Use a timer to count to 2 seconds for example. At timer/DN, MOVe the counter.ACC to a math section. Then the calculated mph or kph can be updated each 2 seconds. And the timer must also RESet the ACCumulated value of the counter.
I know this is vague - it would take me a while to figure out the actual ladder logic for this.
 
I think that i have not properly represented my problem , where i am having problems is with the code writing.
You got that part right, Blue-eyes! After 5 posts, you have failed to make any statement of the purpose or goals for your project.

Is it to measure the "distance-traveled" speed of a geared exercise-bicycle wheel using a PLC?

If that is true, then to get good help, please also state these things:

1. Outside diameter of the exercise-bicycle wheel
2. How many gears, and the ratio of each to the rear wheel
3. Speed sensor brand and model
4. PLC brand and model
5. PLC input types available, and Input Module brand and catalog number.
6. The date that your project is due.

In the end any advise about writeing code around the idea of speed monitoring would be of a great assistance i will work on the hardware selection my self and thanks again.
It is not possible to write working PLC code without first knowing what PLC hardware you have selected. This is called "putting the cart in front of the horse".
 
Last edited:
Speed traveled by a wheel (distance/time) =
(Circumferance of wheel (inches, feet, or meters) multiplied by Revolutions of wheel) divided by Time Traveled (seconds, minutes, or hours).

Say the diameter of the wheel (from outside tread to center) is 12 inches, and we count 416 revolutions in 60 seconds.

C = Pi x Diameter = 3.14159 x 12 inches = 37.69 inches per revolution
C x revolutions = 37.69 X 416 = 1306.9 inches = 108.91 feet.

Speed = 108.91 feet divided by 60 seconds = 1.815 feet per second (ft/sec)

Suppose now we convert this to a SLC or Micrologix PLC program, and set a timer to measure every 1 second of wheel travel time. Our wheel is still 12 inches in diameter x Pi = 37.69 inches.

Time = 1 second
Travel distance for each revolution = 37.69 inches = 3.1408 feet
Revolutions = counted by Counter C5:0 = C5:0.ACC
Speed (feet/second) = 3.1408 X C5:0.ACC
 
Last edited:
I would guess that both the SLC 5/03 and the MircoLogix 1100 are available in the lab, and Peter is supposed to choose which one he wants to use for this project.

I would pick one that has floating-point math instructions (SLC 5/03 and Micrologix 1000 do not). Otherwise, a lot of scaling up and down will have to be done (unless the wheel circumferance happens to a whole number).
 
Last edited:

Similar Topics

ok Back to see how much poo i can stir with this One.lol right off the bat, here is exactly what the project sheet reads, Word for Word. The...
Replies
57
Views
10,465
Hi All, Someone at work has put a PLC system on my desk, that's just been taken off an idle production line. He said "It's an S7 PLC. We don't...
Replies
3
Views
72
Hi, I have had problem with upgrading some projects from v16 to v18. I tried it on 3 diffrent computers. I want to post this so that anyone that...
Replies
3
Views
148
I am running CCW 13 trying to upload to a micro 820 vers.12 I get an output message OPC server is unable to load project controller. Please help!
Replies
5
Views
224
Hello, I am trying to get a Yokogawa Hart pressure Transmitter and a Rosemount Temp Transmitter to read on a 1769-IF4 module on an L33ERM...
Replies
10
Views
376
Back
Top Bottom