Function block for analog scaling in mitsubishi gx works3

IdealDan

Member
Join Date
May 2017
Location
MA
Posts
480
Hi Friends,
Please, who can tell me the Function Block used for scaling 4-20mA to say 0-200PSI in Mitsubishi GX Works3?
 
I know nothing of GX Works3, but in general built in functions aren't always needed, write your own scaling function:


Code:
// Scaling uses this formula:
// Ov = [(Osh – Osl) * (Iv - Isl) / (Ish – Isl)] + Osl
// 
// Ov = scaled output value
// Iv = analog #Input value
// Osh = high limit OF the scale FOR the scaled #Output value
// Osl = low limit OF the scale FOR the scaled #Output value
// Ish = high limit OF the scale FOR the analog #Input value
// Isl = low limit OF the scale FOR the analog #Input value
 
I know nothing of GX Works3, but in general built in functions aren't always needed, write your own scaling function:


Code:
// Scaling uses this formula:
// Ov = [(Osh – Osl) * (Iv - Isl) / (Ish – Isl)] + Osl
// 
// Ov = scaled output value
// Iv = analog #Input value
// Osh = high limit OF the scale FOR the scaled #Output value
// Osl = low limit OF the scale FOR the scaled #Output value
// Ish = high limit OF the scale FOR the analog #Input value
// Isl = low limit OF the scale FOR the analog #Input value
Ok Bro. Thanks for the response.


Assuming a 4-20mA to 0-200PSI Scaling, From above: Do you mean

Osh = high limit OF the scale FOR the scaled #Output value=200psi ?

// Osl = low limit OF the scale FOR the scaled #Output value=0psi ?

// Ish = high limit OF the scale FOR the analog #Input value=20mA ?

// Isl = low limit OF the scale FOR the analog #Input value= 4mA ?


// Iv = analog #Input value (SHOULD THIS BE THE TAG)?
 
Last edited:
If the Input Value is in mA, then yes.


On the PLCs I use the Input Value is the output of the Analog block and in the range of 0 to 27648. So for me Osh and Osl would be 200.0 and 0.0, Ish and Isl would be 27648.0 and 0.0. You will need to be working Floating Point numbers.
 
If the Input Value is in mA, then yes.


On the PLCs I use the Input Value is the output of the Analog block and in the range of 0 to 27648. So for me Osh and Osl would be 200.0 and 0.0, Ish and Isl would be 27648.0 and 0.0. You will need to be working Floating Point numbers.
You are right. Resolution 0-27648 for siemens, 0-16383 for AB SLC.
I need to figure out Mitsubishi's Resolution,
I Trust some one here will have an idea
 
The 0 to 27648 I gave would be for a 0-20mA signal, 4-20mA would be 5529 to 27648. 5529, is 27648 divided by 20 multiplied by 4.
 

Similar Topics

Hi, I have attached herewith one image which our programmer has been used in S7 1500 PLC. Now we need to use the same instructions in S7 1200 PLC...
Replies
4
Views
111
Please see attached file. I need this program in Function Block form but I am totally lost on this. Any help would be appreciated. Thanks!
Replies
8
Views
286
Hi! I am using a TM200CE40T PLC from Schneider to write data over Modbus. I have used Memory words (%MW) before using the Write variable...
Replies
1
Views
525
Hi folks. New to the forum, but been working with PLCs for several years now. Would like some advice on whether you would keep this logic, or...
Replies
9
Views
1,059
Hi Yes, I'm stuck again. Trying to define a Function Block. What I've put in there so far has been a straight copy/paste from the code (and that...
Replies
22
Views
2,800
Back
Top Bottom