s7 300 move instruction

nick1983

Member
Join Date
Apr 2017
Location
Northants
Posts
1
Hi all

I currently have a system where data is scanned into a system and in the fc is a move instruction which I move a '00' on the input and move it to a db98.dbw14 for example. I was wondering if the input can contain lets say 2 pieces of data in a sort of an OR case so its either '00' or '01' for example

Many thanks
 
Hi all

I currently have a system where data is scanned into a system and in the fc is a move instruction which I move a '00' on the input and move it to a db98.dbw14 for example. I was wondering if the input can contain lets say 2 pieces of data in a sort of an OR case so its either '00' or '01' for example

Many thanks

You could have 3 inputs in your FC:
1)in1 ("00")
2)in2 ("01")
3)decisionbit (true/false)

If input 3 is true, move in1, if it is false, move in2.

It might be easier to do that logic on the outside of the FC though. Just make it the rung above the FC call.
 
- Create a temp variable, let's say T_var

- Create the condition logic before calling the MOV block.
A Bit
JC cond:
L 00
T db98.dbw14
JU mov
cond: NOP 0
L 01
T db98.dbw14

mov: NOP 0

Call MOV ...
 

Similar Topics

there is another problem when I use the Function below: there are 100 step in the DB200 there are 12 items for each step: Step 1------------...
Replies
10
Views
4,417
RE:Another Q for Move data to different address(Siemens S7-300) Thank you again for this, However I wanna to ask about: If I receive a initial...
Replies
1
Views
2,580
Thank you About L D[AR2,P#0.0] I found it very useful, and how can I make the 100 step automatic put the input value into DB200 , if I choose 1 ~...
Replies
1
Views
1,846
Hello all, If I wanna move a value (20) to DB200.DBW10, DB200.DBW20.....DB200.DBW200 how can I make it happen by using a ladder or STL ...
Replies
2
Views
1,679
I am new to S7 300 programming, I have a program with a Integer tag "#TARGET POSITION" My question is in ladder, I cant find anything writing a...
Replies
15
Views
7,786
Back
Top Bottom