S7 Programming

ed.kelly

Member
Join Date
Jan 2009
Location
alabama
Posts
19
I m writting a program for a leak tester, and Im using a FC105 block to scale my analog input. The output address of the scaling function is MD20. I need to be able to take the output MD20 at a specified time during the test, and later compare it with the the reading of MD20 at the end of the test.

For example.
A (my condition to execute)
L MD20
T MD40

Would this work, am I actually taking the reading from MD20, and transfering it to MD40? If so can I at a later time do a SUB_R with MD 40, and MD 20, and make that out put MD 60. I need to be able to get the pressure drop over a 35 second period of time.
 
No, Load and Transfers are unconditional.


You would need

Code:
AN (my condition to execute)
JC Over

L MD20
T MD40 

Over: {next instruction}

and your condition would best be a one shot.


Dont forget MD20 = bytes MB20-23 and MD40 = bytes MB40-43. You could use T MD24, to take up the next bytes.
 
Last edited:
or you need to:

Code:
A (my condition to execute)
jcn over  //jump to jump label over if RLO is false 
L MD20
T MD40 
 over: nop 0 //jump label over, with null instruction nop 0, nop 0 can be changed with any intruction needed next.
load, transfer ect. instructions are executed without regard to RLO (=Result of Logic Operation)
 
Last edited:
What is a good example of a one shot. I'm just learning Siemens simatic manager. Any help would be greatly appreciated.
 
Code:
a (input to trigger oneshot)
fp #oneShotMemory  //fp for positive edge, fn for negative edge
#oneShotMemory can be either from M memoryarea or from DataBlock.

Code:
a i0.0
fp m10.0
s q0.0

a i0.1
fn m10.1
r q0.0

above code would set output q0.0 on when input i0.0 sees positive edge, and reset it when i0.1 sees negative edge.

Code:
A (my condition to execute)
fp m10.0 //trigger only when condition comes to true
jcn over  //jump to jump label over if RLO is false 
L MD20
T MD40 
 over: nop 0 //jump label over
 

Similar Topics

Dear all, I have fx2n plc on my hand but I don't have the programming cable sc-09 and it would not be easy for me to get one. I need the cable...
Replies
3
Views
110
Hi all, i am the new controls guy at the plant and i have inherited a pc from the previous controls guy with Siemens tia portal version 16 and 17...
Replies
20
Views
879
I need to pull the program off of an old 90-30 so I can convert it to Allen Bradley. This is my first time messing with GE and I don't have the...
Replies
2
Views
84
New to vfds. I put in parameters. IP, but I get ethernet flashing and link solid. What did I do wrong?
Replies
9
Views
473
I'm been deciphering a program for a press here. I've gotten most of it deciphered using the manual to understand the instructions (first mitsu...
Replies
11
Views
287
Back
Top Bottom