How to access bit of word S7-1200

outofservis

Member
Join Date
Aug 2010
Location
Turkey
Posts
2
I am trying to write a function for S7-1200 CPU1214.

There is Inout Word type parameter of function and I want to use the bits of this word wişth contact and coils.

It can access the bits in S7-200 by L1.3 but in S7-1200 this syntax gives an error.

Please help me about that.
Thanks in advance.

Kind Regards.
 
hmm

I don't know the 1200 CPU's, but I guess they are similar to S7-300 CPU'S ?
If so, then try:
Code:
L #Yourword
T #Tempword
 
LAR 1 #Tempword
A [AR1,P#1.3]
= Q0.0
Your word is the In Out parameter.
Tempword is a declared word in the temp area of the function.
Q0.0 will be high when bit 1.3 in Yourword is high.

An other method is filtering:

L #Yourword
L #0000000000001000
AW
= Q0.0


These are untested pieces of code, I'm just thinking what's possible in an S7-300 CPU.


Regards,
Gerry

I am trying to write a function for S7-1200 CPU1214.

There is Inout Word type parameter of function and I want to use the bits of this word wişth contact and coils.

It can access the bits in S7-200 by L1.3 but in S7-1200 this syntax gives an error.

Please help me about that.
Thanks in advance.

Kind Regards.
 
You can do it in addressing in the 1200

I have done it

Will have a look, cant remember what i did and i have had too much red wine to focus tonight ;-)
 
Unfamiliar with S7-1200 but move the word to a MW and then use the individual bits of the MW for your contacts/coils.

The manual states that local data can only be referenced symbolically.
 
Omg

Oh My God,

I never want to use 1200 then. Even a 200 PLC has IL.
Why they sell PLC's that only can be programmed in LAD or FBD ?
U even need to buy new software...
These are only good for extreme small applications then ?

In a recent project I need to control 20 valves. I'm doing this with an ET200S (IM151-8) CPU and Burkert 3/2 valves.
The panel is a basic panel, normally used together with the S7-1200 I think. But they work on other Siemens PLC's too. They only have 256 tags, no archiving, but good for the job.

I prefer ET200S CPU's. No new software, STL, SCL and graph, all possible...
 
Last edited:
an example please...

You can do it in addressing in the 1200

I have done it

Will have a look, cant remember what i did and i have had too much red wine to focus tonight ;-)

Hello there .... I am completely new to this PLC stuff.. !!!..
I have finally built up three "count up" counters in my S7-1200 system..
Now how - do I read and display the values of the CV registers, or for that matter output them through a RS232 comms link....
...WHEN THERE IS NO SCL..???....

Kindest Regards
Cardac (Spencer)....
 

Similar Topics

Hi All, Newbie questions but I have two of them!: 1. I am unable to toggle the bit on I:0 (it keeps at 0). If I go into the data file and...
Replies
10
Views
2,418
Good Afternoon All, I am hoping someone here will have some input to get me past this terrible hump. I have programmed Siemens 200 and now 1200...
Replies
5
Views
2,818
As an example, if i create a tag in the PLC called "tag1" as a DINT, and then reference several times that tag at the bit level in FTalk, does the...
Replies
3
Views
1,688
Hi All, I'm trying to write (STL) a function(blok) in S7 I just want to in-output a "byte" and use it in my function as "byte.bit" format. I...
Replies
14
Views
3,585
Hi everyone, Sorry if I am a little vague but this question was ask to me by someone working on a system that I am not familiar with. Anyway...
Replies
26
Views
17,176
Back
Top Bottom