Modsoft woes

pauly

Member
Join Date
May 2002
Location
South Wales,U.k
Posts
244
I am trying to decipher an existing Modicon Modsoft program, the program is very large and I am having real difficulties in deciphering the code. I have attached an example section of code which I think is some sort of ramp function,contact 1821 is I think pulsing which adds, and thus ramps, the value in 405541. The rest I think is limiting because I think the SUB block is being used as acompare function. If there are any Modsoft experts veiwing I would really appreciate some feedback on my assumptions and any ideas as to the best way of translating this into Unity Pro.I am on a very tight schedule and starting to panic so ANY help/advice would be great. Thanks in advance

modsoft.JPG
 
Hi Pauly,

Man, are you in some serious ...! ;-) Back in 2003, I had to struggle through the same in the tires & rims dept at the Belgian GM plant.

The famous SUB instruction not only performs the subtraction, it also powers one of the 3 taps on the right of the instruction block, depending on the result of the subtraction:
result > 0 / result = 0 / result < 0.

It's also very often used just to move a value from one location to another if the center value = 0.

I'm no Modsoft expert by far, but it seems to me that the network has an integrating function, depending on 001821 and, like you said, limited to a minumum and a maximum value.
 
I would start with a blank piece of paper. Write a functional description of how the process should work. Break it down into small functional units, defining operation, fault conditions, alarms, etc. Then write the new program. This will result in a much better program than if you just convert the existing code.
I have converted many old programs, with the most successful being the ones I did not even look at the old code (a blast furnace charging and material handling system). And the conversions that cause the most pain are the ones when a rung for rung conversion is specified, usually because the customer believes this to be the low risk method (it's not)
 
pauly said:
I am trying to decipher an existing Modicon Modsoft program, the program is very large and I am having real difficulties in deciphering the code. I have attached an example section of code which I think is some sort of ramp function,contact 1821 is I think pulsing which adds, and thus ramps, the value in 405541. The rest I think is limiting because I think the SUB block is being used as acompare function. If there are any Modsoft experts veiwing I would really appreciate some feedback on my assumptions and any ideas as to the best way of translating this into Unity Pro.I am on a very tight schedule and starting to panic so ANY help/advice would be great. Thanks in advance

modsoft.JPG

If coil 01872 is ON, Compare register 405540 with 2030.

If reg 405540 is less than 2030, then move the contents of reg 405540 into reg 40001.

If reg 405540 is greater than or equal to 2030, then compare it ro reg 405541.

If reg 405540 is less than reg 405541, then move the contents of 405540 into 405541 and 40001, if the value is greater than 3359, then move 3359 into reg 40001.

If reg 405540 is greater than reg 405541 and coil 01821 is on, then add 10 to reg 405541 and then move 405541 into reg 40001, if the value is greater than 3359, then move 3359 into reg 40001.



note 405500 is a dummy reg for comparison instructions.
 
You can convert this program to with pl7 pro and then convert it from there to unity. If there is an old xbt involved you should have some transfer blocks for messaging to the xbt. These blocks normally give you hasles in converting.
 
984 Ladder Logic does not have a dedicated function block for comparing register values, because the SUB function can be used for this task. As Sparkz said, many programmers found it was easy to use the single SUB function rather than using separate compare and move commands.
 
Jim Dungar said:
984 Ladder Logic does not have a dedicated function block for comparing register values, because the SUB function can be used for this task. As Sparkz said, many programmers found it was easy to use the single SUB function rather than using separate compare and move commands.

Also there is no move instruction, that is why many times an ADD 40001 with 0 and place in 40002
 
Thanks

Thanks for the replies I thought the same as GeoffC, forget the old code and rewrite but the old code is all we have as far as a spec is concerned. Nothing else. Our sales people think this is enough but I have been tearing my hair out trying to see what the PLC actually does. It's not just me is it? There hundreds and hundreds of lines of code like this in this project and it is difficult isn't it?
 
Does the code have tag descriptors and/or network descriptors? or is the only copy you have an upload?

Very difficult without descriptors, some modicon code can look mind boggling, especially when its just box after box (usually where its setting up constants or control words for other parts of the code).

BTW where in South Wales, from Port Talbot myself, very confusing here, I can see the sun.
 
Modsoft woes reply

There are no rung comments at all, the variables have comments albeit not nescessarily the correct ones. Again thanks for taking the time to reply.
 
curlyandshemp said:
Also there is no move instruction, that is why many times an ADD 40001 with 0 and place in 40002

And all these years I thought BLKM was a move instruction.

ADD instructions tend to end the instruction line. SUB functions can easily be expanded on, which is why they are much more common.
 
A very typical 984LL network...brings back memories from many years ago. Get to know the instructions and you need to always check vertical shorts to see exactly what the power flow is doing.
Typically the original programmer has proably used 405500 thoughout the program for SUB commands as a TEST block. Also SUB usually used for MOVE of a single word...and sometimes is actually used for a subtraction.
BLKM usually for muliple words or going from bits to word and vice versa.
400001 is proably an analog output, check in traffic cop for analog IO words configuration. When you have MULT and DIV blocks things get a little more fun as double words come into play...just write out the equations with both word addresses shown.
If you have a network with a timer sitting there with nothing connected to the input then your original programmer is sneakily using its output as a way of getting power into the middle of a network...I was never guilty of doing this..maybe once!!

remember word assignments:
0xxxxx coils and digital outputs
1xxxxx digital inputs
3xxxxx analog inputs
4xxxxx analog outputs and internal words
 
I believe a SUB block was often used to move data around because its scan rate was faster or more efficient than using a BLKM to perform the same function.

A lot of people don't like the Modicons because of the way logic scans but you could sure put a lot of functionality into one rung. To me this makes troubleshooting a little easier.
 

Similar Topics

I am trying to locate a copy of Modsoft in order to program an older an AEG module. Unfortunately Proworx is not functioning correctly in order to...
Replies
5
Views
2,342
Hey all, I am trying to communicate with an old PLC using Modsoft. It's a Modicon Quantam 140 113 03. I am using Modsoft and whatever I try, I...
Replies
1
Views
1,480
Hi i am starting to learn PLCs. i have a quantum modicon (Electric Schnieder) PLC and i am using modsoft. i would like to know how can i set and...
Replies
6
Views
2,229
Hi all, I have some issues with a Modicon 984-385E on a machine we recently acquired. The unit was operational before it was moved but the genius...
Replies
27
Views
11,462
Hey guys I need some help here, I don't have access to Modsoft as I presume this program was created in. I tryed locating Proworx32 on the web...
Replies
3
Views
3,214
Back
Top Bottom