Siemens S7-300 Help!

pasteleiro

Member
Join Date
Jun 2010
Location
Somewhere
Posts
3
Hey

I come before you to ask your help about a problem I'm having with a program for S7-300.

Any ideas how to change the first bit of a word (or double word) to "1", then rotate it left until it reaches bit 15, then send that bit to another word, rotate, send and so on?

The idea is that the "1" goes through a series of words till it reaches a specific bit inside a specific word.

My questions: How do I adress a single bit inside a word? To write and read from it? How to rotate through a "n" number of words?


I'm new to Siemens so plz excuse me if I'm not seeing this right

Thank you all in advance:geek:
 
MD = 4 bytes, therefore MD4 = byte 4,5,6 and 7.

To set the left/right hand bits

A "ON" // Any true condition
= M 7.0 // Sets the most right hand bit
= M 4.7 // Sets the most left hand bit.

L MD4
SLD = shift all 32 bits left.



MW = 2 bytes, therefore Mw4 = byte 4 and 5.

To set the left/right hand bits

A "ON" // Any true condition
= M 5.0 // Sets the most right hand bit
= M 4.7 // Sets the most left hand bit.

L MW4
SLW = shift all 16 bits left.




Another note, CC 1 is set to 1 if the bit drops out at the end.
 
Last edited:
thank you, i knew how to rotate and stuff, my problem was adressing the specific bits inside each dw or w

just another question..i know its possible to create an array of variables, in this case DW..is there anyway to rotate that array? if yes, how to do it?

ty all =D


MD = 4 bytes, therefore MD4 = byte 4,5,6 and 7.

To set the left/right hand bits

A "ON" // Any true condition
= M 7.0 // Sets the most right hand bit
= M 4.7 // Sets the most left hand bit.

L MD4
SLD = shift all 32 bits left.



MW = 2 bytes, therefore Mw4 = byte 4 and 5.

To set the left/right hand bits

A "ON" // Any true condition
= M 5.0 // Sets the most right hand bit
= M 4.7 // Sets the most left hand bit.

L MW4
SLW = shift all 16 bits left.




Another note, CC 1 is set to 1 if the bit drops out at the end.
 
...that shifts words, not bits.

Kalle most likely answered to this:

thank you, i knew how to rotate and stuff, my problem was adressing the specific bits inside each dw or w

just another question..i know its possible to create an array of variables, in this case DW..is there anyway to rotate that array? if yes, how to do it?

ty all =D
 
thank you all for your help, you guys are life savers

i'll be learning a bit more about PLCs and i hope in the future i can contribute more to the forum

cheers

J
 

Similar Topics

Hi to all, Our company does not usually use Siemens PLCs, but have a press with one in it. We are trying to change the IP address in our Simatic...
Replies
2
Views
1,082
I have a siemens 317-2 and an old GOT1000 (GT1675M - V) I am trying to get the darn things communication and having no luck. I have followed the...
Replies
12
Views
2,228
Hi, I need a bit of help. I have an S7-300. it is used to detect wether product is too long etc. When I first turn it on it operates fine and an...
Replies
16
Views
3,325
Hello all, I am an electrical engineering student working on a senior design project with an industry sponsor. We are automating a burst test...
Replies
26
Views
13,986
Good People, I am badly stuck here and seeking urgent help. I am using ET200S system having IM151-8 CPU. The programming software I've got is...
Replies
1
Views
2,357
Back
Top Bottom