Cross referencing 2 variables to a chart in 5000?

krakenfan69

Lifetime Supporting Member
Join Date
Nov 2011
Location
Alberta
Posts
227
HI guys,


I have a project where I need to set a SD based off of 2 variables. Speed and Differential pressure. I have a table that has the speed setpoints down the left side and the diff press across the top. If I cross reference the two I get the flow rate setpoint. Is there a function that will allow me to create this table and do this cross reference for me? I've been searching but haven't pegged the right keywords just yet. This is to be done in RSLogix 5000 version 20.01 on a 1756-L74 processor.

Thanks for any help,

Kraken Fan #69
 
HI guys,


I have a project where I need to set a SD based off of 2 variables. Speed and Differential pressure. I have a table that has the speed setpoints down the left side and the diff press across the top. If I cross reference the two I get the flow rate setpoint. Is there a function that will allow me to create this table and do this cross reference for me? I've been searching but haven't pegged the right keywords just yet. This is to be done in RSLogix 5000 version 20.01 on a 1756-L74 processor.

Thanks for any help,

Kraken Fan #69

It sounds like what you need is a two-dimensional array. That's basically all a table is anyway.
You could make an array, call it Flow_Rate_Setpoints, and make the datatype be REAL[20, 20] (if you had 20 speed setpoints and 20 differential pressures). Decide which variable is which, and load your values from your table into your array accordingly.
So let's say you make Speed_SP dim 0 and Diff_Press dim 1. To get your flow rate setpoint simply do MOV(Flow_Rate_Setpoints[Speed_SP, Diff_Press], Current_Flow_Rate_SP) .
Usually a good idea to do some limit checking of your pointers prior to using them as array indices to avoid faulting your PLC!

EDIT: There is no actual function to BUILD such an array in logix, unfortunately. So if you do have that big of a table to build, then using some vba code from an excel table where you already have the table built is a good option for getting your values into your array. This could be done fairly easily with a nested for/next loop setup.

Hope this helps.

Cheers,
Dustin
 
Last edited:
Yeah, I was thinking the same as you.

I made a quick loop to compare several arrays.
2x10 to compare
10x10 for the data setpoints

Was able to get it so it could find the setpoint in a 10x10.
Would need to be tested, but just something I came up with quickly.

Kgudtif.jpg
 
Last edited:
Yeah I guess I should clarify. In my example, the actual speed and DP setpoints would not be the pointers into the Flow rate sp array, but rather the index of each of these selections would be a pointer for their respective dimensions.
So if on the HMI, you gave the operator a list of valid spd and dp setpoints, say with a pair of control list selectors in FT View, then the index of each would already be within the bounds of your array, so it would save you the error checking and the need to have to search through the array looking for a pair of random setpoints.
 
Not sure if it would help, but there is the FGEN instruction in Logix 5K that can take tables of X/Y points, generate a curve, and then best fit the output to a given input.
 
If your Chart is 25x25 then that is 625 values. You need 3 Arrays.

Array1=Chart Top[25]
Array2=Chart Side[25]
Array3=Chart Values[625]

Use a FSC instruction to Find Chart Top Value.
Use a FSC instruction to Find Chart Side Value.

Multiply Array1[FSC1.POS]x 25 then Add Array2[FSC2.POS] = Array3[Position]
 
Thanks for the replies so far guys. I am trying to keep away form the excel solutions as this will be driving SD's I am concerned about the excel sheet getting closed and then I am not populating my SD.

Van- I'm just trying to get my head around the "grid" populating on your idea but I am liking it. Just still making sense of it.

RDRAST- I looked at the FGEN function but that is only going to give me one col by one col isn't it? I am looking at 6 speed ranges (not setpoints that are set by operations, just if the speed is 300 rpm its range 1, 450 rpm is range 2 etc.) then cross reffing that against 9 diff pressure settings so I have 54 possible setpoints. Am I missing something in the FGEN?

Thanks for all the suggestions guys,

Kraken Fan #69

 
Last edited:
My reply has nothing to do with using the excel sheet. I only used that to explain my example of the 3 Arrays.
 
Yeah, You will need to fine tune for your application but I started with the assumption that your chart was 0 -> 10 for both X&Y. (So, if greater than 40 count 1 but less then 524 stop counting.)
 
UPDATE: I got it working using VANs method. Took me a minute or two (ten) to get the data table right Then I tossed it in a test rack and had at it. A little more tweaking and bingo! Thanks for the help. Interesting way to handle it. Way cleaner than my original thought. Still having trouble thinking in more than one dimension in PLCs.

Thanks to all that offered suggestions too. I love seeing the different ways guys attack problems on here!

Kraken Fan #69
 

Similar Topics

Hi, I have a very old machine I am trying to fix. The PLC is an FA-2 Junior and I am able to connect to it and monitor the code using WinLDR...
Replies
11
Views
2,569
All of these processes are taking all day to run. When doing the same operation in a stand alone intouch application it only take a few minutes to...
Replies
0
Views
1,573
I have a UDT tag that has about 30 members. I want to cross reference just one member of it. When I right click on a specific tag member to...
Replies
4
Views
2,686
Hi all, Just wondering if anyone can tell me how to find all instances of an input (or any other tag for that matter) anywhere in a Step 7 v5.5...
Replies
4
Views
9,772
Hi, I'm needing to convert some screens from RSView to Cimplicity. The screens need to be virtually identical, with all functionality included on...
Replies
1
Views
3,339
Back
Top Bottom