Siemens PLC 1200 timer PV problem

suboliu

Member
Join Date
Oct 2010
Location
windsor
Posts
266
Hello everyone,
I am newer on Siemens PLC 1200.
From HMI, I set timer value and place in MW20(120) like 120 second
How to input MW20 to timer PV? because PV format is time base + BCD, like S5T#XX. My question is: how to convert MW20 to S5TXX so I can input it as PV. better give me example.

Appreicate with any help!
 
Hello everyone,
I am newer on Siemens PLC 1200.
From HMI, I set timer value and place in MW20(120) like 120 second
How to input MW20 to timer PV? because PV format is time base + BCD, like S5T#XX. My question is: how to convert MW20 to S5TXX so I can input it as PV. better give me example.

Appreicate with any help!

In the 300's, you could use the old, messy (BCD) S5 timers, or the good new IEC timers. In the 1200, you only have IEC timers.

They use the TIME data type, which is essentially a UDINT of milliseconds, but the system is smart enough to break that into days/hours/min/etc to display it to you.

You'll need to convert the time entered on the HMI into millisconds, but it should be an easy copy from there. You can do it directly at the block call, or with the -(PT)- instruction.
 
What is your exact S7-1200 CPU and what programming software are you using. For example, using TIA V14 the S7-1200 range of CPU's do not support the S5TIME data type.

timers.jpg
 
You don't need to use a datatype like that and complicate if you don't want to.
Use a dint value, or I guess a double word would also be usable. But you need to use milliseconds, so 120000 is 120sec.
 
You don't need to use a datatype like that and complicate if you don't want to.
Use a dint value, or I guess a double word would also be usable. But you need to use milliseconds, so 120000 is 120sec.

Thank you very much.
 
I've not used an S7-1200 so assumed I would have to convert types etc. Here's another example after some experimentation:

timex2.jpg
 
If you have this MW20 in your HMI as you stated you could also use the "Linear scaling" on the tag in the HMI.

If you set this so that 1 in the HMI corespond to 1000 in the PLC you could use the value directly from the HMI without conversion since it multiply it in the HMI. This is what I constantly do so I can put my Dint for the timer directly on the timer.
 
If you have this MW20 in your HMI as you stated you could also use the "Linear scaling" on the tag in the HMI.

If you set this so that 1 in the HMI corespond to 1000 in the PLC you could use the value directly from the HMI without conversion since it multiply it in the HMI. This is what I constantly do so I can put my Dint for the timer directly on the timer.

Thank you very much
 

Similar Topics

Hi Guys, I am trying to establish communication over profinet between Siemens S7-1200 PLC as IO device and codesys plc as IO controller. But I am...
Replies
43
Views
2,823
Dear Experts, Please, kindly guide me through how to read data from ABB PLC to S7-1200 Siemens PLC. I want to use Siemens S7-1200 PLC to read data...
Replies
1
Views
443
I've got a whole bunch of L8's and a whole bunch of UDTs that use custom string lengths, but can't seem to figure out how to get these to...
Replies
4
Views
524
Hi Complete newcomer to S7 so go easy on me... Siemens S7: What cable do I need to connect S7-1200 PLC to HMI? The touch screen is one of these...
Replies
14
Views
2,590
Hello all, PLC-programming noob here. I have multiple clients accessing some data on my Siemens S7 1211C PLC; some OPC clients and some direct...
Replies
30
Views
8,303
Back
Top Bottom