S7-1200, change Timers in HMI

rQx

Lifetime Supporting Member
Join Date
Oct 2010
Location
Trelleborg
Posts
1,051
Hello
Just started to work with the KTP400 HMI and s71200, and basicly I'm a beginner to the whole PLC world.
All I want to do is be able to change the time of my timers in my HMI.

I want a field where I can write the new time and a button to send the new time to my timer. How do I do?

Regards
 
Create the timer in the PLC program. Instead of entering a constant for the timer value enter a M word (with correct data type). Then open your HMI screen in a split window with your program and drag the timer tag onto the screen.
 
Thank you! I thought it was something like that!

The problem I have is that I know plc programming but on this job I have to do some more advances calculations and use the memory more. Is there any good guides for that? For example, how do I know what data type I should have?

Regards
 
Memyself would use FLOATING POINT values (REAL datatype) that way I dont have to worry about doing the multiplications first and the divides last and such to get the best accuracy when doing calculations with integers...

But true this varies from case to case.. What calculations is needed to do in your project?
 
It's mostly add or sub.

I want the time of the timers to be editable.
I want to edit them by pressing buttons. So if i activate input 0.0 I should add for example 1second to the timer.

Regards
 
Ok if its timers then you should use DINTs why?

The timers use the TIME format wich really is a DINT where a value of 1 means 1ms..

So if you add 1000 to the TIME variable you have added 1s..
 
So what should I write on my preset value? If i write 1000 there I get T#1000ms.

I guess I can't modify that value ? Because It's the same text on all of my timers.

So I should write a memory value instead? I wonder, what should I write here?
 
If you type 1000 without any sort of unit it will default to ms. You can write 10h30s400ms instead if you want. Give it a go. Easy enough? As with the memory timer thing you can see there how you simply put in a "Marker double word" (of data type DINT)(supposed grammar of Siemens) to the timers preset input.

Untitled.jpg
 
Thank you! It was the Memory Assigning I had problem with since I haven't been working with it. And I just can't seem to find anywhere to read about it. I really want to learn but there isn't any classes right now. That's why I came here, you guys are great! Thank you
 
I've noticed that my value I give my timer from the HMI doesn't stay after powerbreak. Is there a way to make it so? Another memory that isn't temporary maybe?

I've read about retentive memory and I guess it should be a retentive memory? When I Select properties for my "MD1" memory I see a box "retained" but I can't check it.
 
Create a global data block and make sure you select "symbolic access only". In the new data block create your time preset tag and there you can check the box that allows you to retain the value after shutdown.

Tip: To keep your program tree a little neater and easier to work with, create a "global data block" and store ALL of your program data there. Also inside that data block you can also create your timer and counter data types so that avoids having to create a new instance data block everytime you insert a new IEC_Timer or IEC_Counter

Tip: Be aware with the 1200's that everytime you download to the CPU all values will revert back to their initial values. This is a nasty property and a real pain in the *** to work with. There is a work around using a job mailbox pointer with your HMI.

Tip: Go to the Siemens website. There's a heap of FAQ's and some really good blocks available written by the Siemens guys. You'll learn alot from 20 hours trying out every FAQ.
 

Similar Topics

Siemens s7-1200 is set to 102 as the default port, is there a way to change it to another port?
Replies
2
Views
802
My current project has a Simatic S7-1200. It involves a robot with two different tools. Each tool has their own Profinet I/O-devices with...
Replies
2
Views
1,955
Hello, we have a servo saw with an siemens plc s7-1200, a comfort panel 12 inches, we want to import data from excel files on a server with a bar...
Replies
0
Views
1,824
Hello, I changed controller type in RSLogix 500 from SLC 5/02 to MicroLogix 1200 and was given the ladder logic to update it for the new...
Replies
25
Views
4,820
Hi everyone, i´ve done the little project and run perfectly. This is the practice in capture images. this is the first step, exchange I/O between...
Replies
2
Views
2,167
Back
Top Bottom