bgtorque

TIA Portal - Get current data and continuously move to a register for shutdown use

6 posts in this topic

Here's an interesting one.  I have an S7-300 and am using TIA Portal V13.  I have a pressure/flow (p/Q) control valve for oil pressure for controlling oil with feeds a thrust pad bearing, with respect to the thrust generated by the speed of the driveline.  The oil supply has an accumulator that should be good for around 2mins supply and the PLC and control valve are all UPS controlled.  So, should power be lost or the oil pump/drive fails the accumulator will ensure the oil supply for (hopefully) enough time  to keep the thrust under control to bring the driveline down to a stop.

I am monitoring the driveline speed, the thrust/oil pressure/oil flow.  I would like to continuously capture the characteristics of the speed vs. pressure/thrust relationship during normal running, so that I can use this data to command the correct pressure in the pad as the speed reduces.

i.e as the driveline increases in speed from rest up to say 2000rpm I might have (i'll use coarse steps)

0rpm                               0kN
500rpm                            1kN
1000rpm                          3kN
1500rpm                          7kN
2000rpm                          12kN


So if I lose pump power at 2000rpm then teh driveline will start to coast down and I want to ensure that I am controlling thrust at 12kN initially and tehn as we transition down in speed it hits 1500rpm so I then control to 7kN, and so on.

Ideally I would like much finer steps, 100'rpm or even 10's rpm but am practical in the amount of data would need to be stored, so would find a sensible limit.

What would be the best practice in achieving this in terms of ladder code (ideally ladder as that's want I have most experience of).  I'm guessing dumping the data to an array of x vs. y in some way?  I could write something simply if it was just for a few points like I have described above as it would be a line of code for each.  But lets say my speed is upto 20 000rpm then this would be a lot of MOV instructions and IF or == statements.  There must be an elegant way of coding this simply that eludes my knowledge?

Any help would be appreciated.

Thanks,

Share this post


Link to post
Share on other sites

Not sure if I understood exactly what you want.
So I made a Function block that you could put in your cyclic interrupt (OB30 or OB35 for example) I'm assuming you already defined %ThrustReal and #RPMReal as a 0-200 and 0-2000 floats using a scaling of the inputs.
Now I am generating an array Thrust[0] to Thrust[4] with the measured value of thrust for 0 RPM, 500RPM, ... , 2000RPM.
The way I'm doing is it simply checking if the RPM is within 5% of one of the values (500 or 1000) for example. If so save the thrust to the array.

I'm not sure if that type of move will work on the 300 series, you may need to use pointers in STL.
Not sure if uploading images to the board works, so here is a link: http://imgur.com/cCX5W0O
 

RPMThrust.png

Edited by Diameter157
move doesn't work on 300 series
1 person likes this

Share this post


Link to post
Share on other sites

@bgtorqueHow did you calculate your values? Did you assume rpm and then calculate thrust? Did assume thrust and calculate rpm? Did you just arbitrarily pick numbers?

Share this post


Link to post
Share on other sites
Just now, pop29684 said:

@bgtorqueHow did you calculate your values? Did you assume rpm and then calculate thrust? Did assume thrust and calculate rpm? Did you just arbitrarily pick numbers?

In my example above they are just random numbers to illustrate my question.  So the linear/non-linear relationship should be ignored.  In reality I will be reading rpm and thrust and I just want to dump the corresponding thrust values in an array when at speed so I can control the thrust to the same conditions in an event where I lose the communication from the customer PLC who is defining the thrust vs. a particular speed.

Share this post


Link to post
Share on other sites

So did you try my code and did it work?
It worked fine on the 1200 series I simulated it on. Can't remember how to write with pointers though for the 300 series.

Edited by Diameter157

Share this post


Link to post
Share on other sites

Can the relationship be expressed mathematically? If so, then it seems a fairly simple calculation should be able to solve your problem without storing the values in a lookup table.

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