modicon 984 proworx analog scaling help

V0N_hydro

Member
Join Date
Sep 2010
Location
lower mainland
Posts
560
Hi

I have a modicon 984 with proworx 32 that is scaling an analog input, and I need to adjust the scaling. I have new analog input values and % readings from a gauge.

the program reuses the intermediate registers in other rungs so it is difficult to make sense of the logic. I am told the PLC is full, so maybe that is why they reused those registers.

see attached word file - anyone who has used this platform can understand how this scaling is working? Even if I can add a rung and put the intermediate values in some other registers so I can test a new scaling before putting it in service would be a step forward.

I know unity and allen bradley quite well but I am hesitant to try and modify this system while it is running without knowing much about it
 
I think the calculation, which is emulating the EMTH:Multiply, in the attached .docx is missing a zero i.e. this

2516 000 * 0000 1162 = 0000 0029 2359 2000
^
|
Where is the fourth zero?



should be this:

2516.
0000 * 0000.1162 = 0000 0292.3592 0000
^ ^ ^ ^ ^ ^ ^ ^
| | | | | | | |
| | | | | | | @40928
| | | | | | @40927
| | | | | @40926
| | | | @40925
| | | @40924
| | @40923
| @40922
@40921


Note that I also assumed some implied decimal points, and that the 0292 ends up in location @40926, i.e. at an offset of 3 from the @40923, which @40923 is the start of the 4-element product result of the EMTH:Multiply (that offset of 3 - a real Huh? moment - was what turned on the lightbulb for me;)).

If we do the same with the intercept and the EMTH:Subtraction, placing decimal points consistently, and noting that it subtracts @40923 from @40921, after a BLKM moves two holding registers starting at @40926 ti @40921

0292.3592 - 0238.6612 = 0053.6980
^ ^ ^ ^ ^ ^
| | | | | |
| | | | | @40926
| | | | @40925
| | | @40924
| | @40923
| @40922
|

@40921, moved from @40926 result of EMTH:Multiply


And the result, in @40925, is 53, which is then BLKMed to @40903, is pretty close to the expected 55 in @40903.

Presumably the 238.6612 intercept used in the subtraction is based on a true intercept of 239.1612, so the subtraction adds 0.5 to the result, which in effect rounds the integer value that ends up in @40925 and @40903.

scaling.png
 
Last edited:
EMTH was extended math function which uses 2+4 integers for values on math on middle node of block. 2 register values was for 2nd number and 4 registers where used for storing data.





So on colums 2 and 3 is moving analog value to first 2 registers.


(Analog input at register 30012 is moved to 40921)
add 0 to 0 is moved to 40922 so it is allways 0. (add and subtract was usually used instead of move. I dont remember anymore if it was faster for PLC scan or why)


=> first value is on registers 40921 and 40922 2516.0000)


on colums 4 is block move 2 registers, so 40954 and 40955 are moved to 40923 and 40924 => 0.1162



EMTH3 math is multiplying these and writing values to registers 40925-40928.



Here is the fun part. 40925-40927 are full numbers and 40928 is decimal of float number. -> 292.3595 (I think)


Now on 40926 is result of math , so colums 5 block move 2 transfers value without decimals to 40921 and 40922. (00000292)



colum 7 transfer value (238,6612) to registers 40923 and 40924


column 7 subtract registers and transfer result to 4 registers 40925..40928


40925..40926 is full result and 40927 and 40928 is remainder of division. -> Simple math: analog value * 0,1162 - 238,6612 = result with rounding decimals off?


With real PLC it would be easier to see math from registers values. It was allways mess when trying read extended calculations and trying to undestand what happens.


Note that registers used for storing data was little bit different depending of EMTH functions. 🔨
 
Last edited:

Similar Topics

Hi I am dealing with Modicon PLC 984 series controllers and using Modsoft ver 2.0 tool for programming & for communication since it is DOS based...
Replies
2
Views
3,959
Hi I have a problem with modicon 984 and the software proworx 32 last version. when I try to conect with the plc in online mode, proworx show this...
Replies
2
Views
4,440
We have a simple circuit that we want to latch and unlatch. The ProWorx software offers a Latching Coil -(L)- instruction, but we have no clue as...
Replies
4
Views
7,441
Hi guys, Is there anybody out there (not just anywhere), the UK or Ireland in specific who would be interested in doing PLC training on Modicon...
Replies
2
Views
7,157
I'm looking for knowledgeable advice. We're experienced PLC programmers, and have had a quick problem thrown at us. I've never used a Modicon...
Replies
2
Views
6,865
Back
Top Bottom