Modicon M241 Logic Builder - Custom FB Output issues.

Corm8873

Member
Join Date
Sep 2018
Location
Calgary
Posts
2
Hello,

I just wanted to thank in advance for taking the time to read and help if possible.

I'm currently working on a project creating the Logic for a Modicon M241 PLC. The site will be inputting values from other PLCs. To scale the values to the appropriate range I wrote a custom scaling function block. I've added to the post the logic for my custom function block.

My question is why is my output variable staying at 0. According to the logic the equation should equal 60. But no matter values I input my output variable is always equal to 0. See image below.

FullPic.PNG
 
Because it is INT, and you are dividing 600/1000 (A/B), and that is 0. Them you are multiplying 0 with C, and again it is zero. Then you are adding rPARMScaleMin (again 0).
 

Similar Topics

Hello Everyone, I am new in terms of program the M241 with soMachine 4.3. I realize that the red LED I/O is always ON (red) when i don't have...
Replies
1
Views
1,682
Hi All, Have any of you resolved this... I just opened up a new Modicon M241 and the firmware was outdated. So after using the controller...
Replies
7
Views
9,241
Hello, maybe somebody can help me Software Somachine 4.3 Hardware M241 TM241CE24R I programmed Freq_Gen, but after compile i have a error...
Replies
0
Views
1,411
Does someone have M241 (or M251) SNMP MIB file? It would be appreciated. Best regards, Goran.
Replies
3
Views
2,655
Hello everyone, I just stumbled upon this site and it looks really interesting! This is my first post here. I have never programmed PLCs before...
Replies
9
Views
8,930
Back
Top Bottom