Basic GE ST question

radsett

Member
Join Date
May 2008
Location
Waterloo,ON
Posts
10
I have what should be a simple question but even after fighting with Proficy ME and their help system for hours I'm not much closer to an answer than when I started. I just want to create a simple function like

(* Simple function to limit a values ramping by limiting the step it can take.
Note depends on the maxiumum and minimum being at least step away from
the maximum int to avoid overflow issues. *)
FUNCTION ramp : INT
VAR_INPUT
in: INT; (* The requested value *)
old: INT; (* The previously used value. *)
step: INT; (* The maximum step size. *)
END_VAR

VAR
max_out: INT; (* The maximum allowable output *)
min_out: INT; (* The minimum allowable output *)
END_VAR
max_out := old + step;
min_out := old - step;
IF in > max_out THEN
ramp := max_out;
ELSE
IF in < min_out THEN
ramp := min_out;
ELSE
ramp := in;
END_IF;
END_IF;
END_FUNCTION

That would then be called as

cur_setpt_rmp := ramp( in:=cur_setpt, old:=cur_setpt_rmp, step:=cur_step);

This appears to me to be pretty basic structured text but I don't see a way to implement it in Proficy. I can create input vars in the parameters, but I don't see a way to create local vars that ar enot retentive and the return value also doesn't seem to be assignable.

Robert

Hmm, I see the post doesn't retain indenting.
 
Response from GE

I've a response from GE now. It turns out you simply cannot create a function.

It seems a very odd thing to leave out of a structured text implementation but there it is,

Robert
 

Similar Topics

Hi all, I have a noob question regarding data handling from sensors. I understand configurations and I/O mapping sensor input/output variables...
Replies
2
Views
195
GE 90-30 using ME 6.0 - Newbie question... Let's say on rung 10 I set a coil (S) with a one-shot. Input to coil drops out, but coil stays...
Replies
30
Views
10,960
Dear experts, i have pretty basic/ dump question, can someone help me to figure out how to read/ what is this? i assume it is solenoid vavle...
Replies
4
Views
1,049
Create ladder logic program to count 4 on pulses (not using a counter) and then turn the output on if the on pulse input signal can look like the...
Replies
105
Views
36,185
Im looking to hook up a 3 wire PNP photocell to an Allen Bradley 1746IV 16 module. Ive watched videos about hooking up DC sensors, but they show...
Replies
3
Views
2,870
Back
Top Bottom