S7-1200 HMI bit change

h20pt

Member
Join Date
May 2010
Location
Portugal
Posts
31
Hello

I'm creating a project using the s7-1200 and a KTP600 HMI interface.
The problem is that i don't know how i can write any number (in this case a number from 1 to 4) using the HMI interface to the PLC.
If i use a I/O field on the HMI and configure it to be an input, i can change it on the HMI console but the value won't be changed on the PLC (the HMI won't send the value to the PLC - i guess that's the problem).
How can i achieve this?
I hope i made myself clear.

Thanks in advance
 
Also, i'm having other problems.

untitled.jpg


With this operation, when the CPU does the first scan (i configured system memory bits to start on MB3000), it should set the %MB23 value to 2, but everytime the CPU starts the %MB23 value is 31. How can that be?
Also, i've implemented an internal clock unsing ADD and compare functions:

untitled4.jpg


I've used the M3200.5 bit (it's the 1 hz internal clock bit) so it would add +1 every second to the %MB185. That way i could implement the seconds.
Once it reached 60 (%MB185 > 59), it would implement +1 to minutes (%MB187) and reset the %MB185 (move function) and so on.
The problem is that it won't just increment +1 every second.. Instead, the incrementing goes crazy: it implements like 35 seconds in 1 second.. It's kinda random.. What could that be?

Thanks
 
Last edited:
looks like something is modifying it somewhere... are you sure there are no other references in your program, even bitwise like M23.0?
I don't know anything about your HMI, but does the change to 31 happen also when the HMI is not attached?
 
looks like something is modifying it somewhere... are you sure there are no other references in your program, even bitwise like M23.0?
I don't know anything about your HMI, but does the change to 31 happen also when the HMI is not attached?

Yes i'm sure.. I've already triple checked the whole code and the memory adresses..
I'm using the KTP600 mono as HMI interface.. Everything works fine except i can't modify any bit or value that i enter through the HMI.
I've also tried to detach the HMI from the PLC and it keeps changing the value to 31.

o_O
 
You are using byte address 3000.
Doesn't the S7-1200 only have 2048 bytes of marker memory?
My 2 cents?
 
Bit Memory CPU1211C - 4096 bytes,CPU1214C - 8192 bytes....
and without Edge it will ADD 1 each scan and in 1 second there is many scans...
 
Can you post your program here (or a screen shot)?

I would but the program is too long.. It has 35 networks each with multiple functions.

Did You use rising edge in front od ADD function?

No i didn't.. I thought about that but i can't really understand how this |P| (detect risind edge) function works.. Would you mind explain how it works please? I see that it has the operand and the inout but i'm not sure how to configure it.. Let's say i'll be using it with the 1 hz memory bit, what should i put at the operand and inout?

Thanks ;)

You are using byte address 3000.
Doesn't the S7-1200 only have 2048 bytes of marker memory?
My 2 cents?

No, it has 4096 bytes, i just check on the datasheet.

Bit Memory CPU1211C - 4096 bytes,CPU1214C - 8192 bytes....
and without Edge it will ADD 1 each scan and in 1 second there is many scans...

Yes, i believe that's the problem, but how can i use the |P| function?

Thank you
 
Last edited:
Also i was able to get the HMI input/output problem fixed :D
I just needed to change the %MB23 address to another one and it worked right after that.. For some reason the %MB23 wasn't letting me change its content either through the HMI or forcing it via PLC software.. Dunno why that was hapenning..
 
Use Edge detection contact and logic after it will be ON only one scan....Positive edge is activated when contact goes ON for one scan,then it must go OFF before change to ON and activate for one scan again...
M_BIT is Memory bit in which the previous state of the input is saved
IN is Input bit whose transition edge is to be detected
OUT is Output bit which indicates a transition edge was detected
 
Use Edge detection contact and logic after it will be ON only one scan....Positive edge is activated when contact goes ON for one scan,then it must go OFF before change to ON and activate for one scan again...
M_BIT is Memory bit in which the previous state of the input is saved
IN is Input bit whose transition edge is to be detected
OUT is Output bit which indicates a transition edge was detected

It worked! :D

Thank you so much for your help and everyone who helped (y)
 

Similar Topics

...and I agree. Context: TIA Portal/HMI = KTP1200 (12" screen) In the attached redacted image, the values in the white boxes are entered by the...
Replies
10
Views
606
Good day, May I ask, what do I need to perform MIGRATION of HMI program from Siemens MP277 10" Touch hmi to TP1200. I already have WinCC Flexible...
Replies
0
Views
110
I've got TIA portal v18, KTP1200 HMI. I want to add a slider bar (if that's the correct name for it) to an HMI screen. Baslcally, like a...
Replies
8
Views
981
See the attached pic ("workflow"). I want to create 2 workflows, depending on if the person who's just logged in is an OPERATOR or an ADMIN...
Replies
17
Views
2,399
Hello, I have a small application with a S7-1200 CPU 1212 and a KTP400 Basic HMI. When i am connected to the PLC with my PC i would like to...
Replies
1
Views
516
Back
Top Bottom