How to move a word to physical outputs in S7?

dmoore26

Lifetime Supporting Member
Join Date
Jul 2017
Location
Virginia
Posts
10
I am trying to take a value from a counter and output it in binary form to the physical outputs of the PLC. Any help would be appreciated.
 
If you are using the CTU counter for datatype Int, you can type %QW0 at the output CV of the counter function, and you'll get the counter value at the bits of %QW0.

If CV = 1 then Q0.0 is set, if CV = 2 then Q0.1, CV = 3 Q0.0 and Q0.1 and so on.
 
I was wrong, the bytes of the output are still swapped in the S7-1200 ( thought they have changed the endianess compared to the S7-300).

If your counter is of type integer, and you write the CV to QW0, then Q1.0 is set when CV = 1, Q1.1 when CV = 2 and so on.

If you need to set Q0.0 when CV = 1, then you have to swap the bytes of the CV value.
 

Similar Topics

Hi all, My name is Firdaus. I am a teacher. And for the next semester I have to teach PLC to student. The problem is, I just move to this school...
Replies
6
Views
1,953
Hi I'm trying to move bits in to a word. I'm wanting to move %10.0 - %10.13 (Onboard Inputs) in to %MW1 I've tried moving one bit in to another...
Replies
1
Views
1,433
Hi I'm trying to move bits in to a word. I'm wanting to move %10.0 - %10.13 (Onboard Inputs) in to %MW1 I've tried moving one bit in to...
Replies
4
Views
3,358
Hi I am trying to move a DWord but it doesnt seen to work. I have created an FC in SCL FUNCTION FC2 : VOID VAR_INPUT iStep : INT ; //Step...
Replies
13
Views
6,310
Okay, I'm not sure if I'm dumb or if GE just does everything bass-ackwards from Allen-Bradley, but I can't figure out how to move 16 consecutive...
Replies
1
Views
2,810
Back
Top Bottom