Sign in to follow this  
Followers 0
denise01

Tacho Read out For HMI Screen

22 posts in this topic

Hi I want to display a Speed Indication on a NS 5 Screen reading Revolutions per Hour. Am okay with the NS side but not too sure what I would need to use to capture the data accurately. i will use a proximety sensor seeong a rotating flag. Thanks Peter

Share this post


Link to post
Share on other sites
If you have a PLC with "built-in" IO (CP1x), there is the PRV instruction that will give you the frequency. CJ1M ver 3+ with "built-in" IO even have the PRV2 instruction that will give you rpm directly.

Share this post


Link to post
Share on other sites
Hello, Yes I have a CJ1M CPU 11 running with CXP. So is the Instruction to use PRV2. If so will programme and try. Many Thanks Peter

Share this post


Link to post
Share on other sites
Hello denise01 The PRV2 instruction only relates to plc's with built-in high speed IO (CP1, CJ1MCPU2x) so is not appropriate if you have a CPU11. If you want to display rotations per hour, then I'd count pulses in a minute and perform a rolling average of these over 60 minutes FIFO-ing the array of readings. The problems of inaccuracy due to timings won't be relevant if you're averaging an hour's worth of pulses I don't think. If you want rpm, then scan time becomes an issue, or should I say or striking a balance between precision, stability and responsiveness of the readout. I have an FB that looks at the plc's internal clock which does a pretty good job of this. However, it's on another pc. Next time I'm on that, I can post it, if it'd be useful. Pp

Share this post


Link to post
Share on other sites
Hello Paraffin Power, Not sure what you mean by FIFOing but any help you can send would be appreciated. I really need something that shows the speed in Revs per Hour and of course shows zero when the machine stops. Regards Peter

Share this post


Link to post
Share on other sites
Fifo = first in first out. Each minute, move the latest minute's data in, and the oldest data out. This gives a rolling total, rather than just counting how many pulses there have been in the last hour. There are ladder instructions for stack control, but I'd roll my own in an ST FB. Pp

Share this post


Link to post
Share on other sites
Okay Paraffin Power, Did you say that you would post an example. Regards

Share this post


Link to post
Share on other sites
Hello again This uses the plc's internal clock (ie if fairly oblivious to scan time), and updates the rate each clock pulse. The DistanceBetweenPulses input parameter was so it would give you m/min or inches/min or whatever you want. If you just want pulses/min then make this +1.0 A oneshot FB is nested. It pulls this in automatically, so don't worry about that. Pp RateCalculation.zip Edited by ParaffinPower

Share this post


Link to post
Share on other sites
many Thanks Paraffin Power, Will put in to programme tomorrow and trial. Am really impressed with NS 5, very versatile. Regards

Share this post


Link to post
Share on other sites
Hello paraffin Power, Not sure what to open the ZIP file with. Please advise. Regards

Share this post


Link to post
Share on other sites
Winzip. Think it's native in windows (speculation). If not, there must be freeware available Pp

Share this post


Link to post
Share on other sites
Just tried to open with cxp ver 9.3 which is what I use but wouldnt open

Share this post


Link to post
Share on other sites
Attachments here need to be zipped. Use winzip (or similar) and extract the .cxf file. This can be imported into a cxp project by right clicking on the function block section of the project tree, and then select 'from file'. This will make the fb available for invocation in your standard ladder. Pp

Share this post


Link to post
Share on other sites
Hello Paraffin Power. i have not really got in to FB yet but am assuming I feed the info in to a FIFO and then put the first stack reading in to the Data Memory area and transfer to the NS 5 Regards

Share this post


Link to post
Share on other sites
Hello The FB maintains a stack of the 10 most recent timings internally, and averages them each time a new entry is made. There's no need to do anything externally. Pp

Share this post


Link to post
Share on other sites
Okay Pp but how is the data applied to the NS 5 and how is the address of the 1 shot sensor addressed

Share this post


Link to post
Share on other sites
Invoking the FB in your ladder will allow you to attach the 'real-world' addresses to the FB via the Input and Output parameters. Have you got the FB in your ladder yet? It's fairly self-evident once you have. Pp

Share this post


Link to post
Share on other sites
hello Pp, Yes I have inserted the FB in to my ladder programme I take it that the one shot FB uses the sensor I have picked as the input and the output is used in the rate calculator. I have never used FB before so I guess it is a question of reading the parameters in the FB and transfering them as addresses in the ladder diagram.Its a good learning experience anyway once I have sussed it I will use it a lot. Regards

Share this post


Link to post
Share on other sites
The oneshot fb is nested; don't worry about it. The idea of a fb is to encapsulate some code so you would rarely (never) address its internal memory. Anything you need from, or presenting to the outside world would be presented as an input or output parameter. This is the case on the example fb provided. Clear as mud? Pp

Share this post


Link to post
Share on other sites
Hello Pp will you have a look at what I have done in the ladder diagram to see if its right its at the end of the counting circuit section. Like I said I am new to FB anyway Thanks L2BODIESMASTER260412nsstufffbstuff.cxp

Share this post


Link to post
Share on other sites
Hello Herewith my comments: 1. I don't know what the ADD instruction on the ENO is supposed to be doing 2.The DistanceBetweenPulses is a REAL, so needs to be entered in the format +1.0 3. The Pulse and Running parameters need to be something other than Always Off 4. The other addresses are all 0; the inputs need populating, the outputs are optional (but the result will appear in one, or both, of them 5. Bare in mind, this was an example rolling average FB; it won't produce wotsits/hour 6. The 'Tweak' parameter was intended to give a bit of calibration; +1.0 yields no calibration will be applied, +1.1 will give 10% over. Hope this helps point you in the right direction. Pp

Share this post


Link to post
Share on other sites
hello Pp In the end I went with a simple programme please see it gives speed but not as good as maybe the FB just cant suss it. Regards Peter average count.cxt.cxp

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0