Siemens S7-400 PID Reset data format
Siemens S7-400 PID Reset data format
(OP)
I am to writing a floating point number for PID “reset time” from a SCADA HMI to a data block register in a S7-400 processor simatic PLC. Contrary to some published data I cannot get the PID block to read milliseconds. The PID block seems to insist that the reset and rate times be in siemens’ “time format” data type before the PID block will read them.
Can I force the PID block to accept milliseconds?
Is there a math block that will convert decimal into time format?





RE: Siemens S7-400 PID Reset data format
it's worth trying to ask ad.support@siemens.com Don't forget to specify CPU model and version, block number of PID block. The more specific you are, the better.
You can also try to look through their database (for conversion block):
http://www4.ad.siemens.de/WW/livelink.exe?func=cslib.csinfo2&siteid=cseus&searchinprim=1&lang=en&content=%2Fskm%2Fsearch.asp%3F&Query=cpu+417-4+update
RE: Siemens S7-400 PID Reset data format
Look in Standard Library/IEC Function Blocks for FC40 TIM_S5TI. It'll convert TIME datatype into S5TIME.
RE: Siemens S7-400 PID Reset data format
in this case, can word containing tag containing number of millisecons be used as input for TIM_S5TI? I guess no.
S5Time is simply BCD. Once upon a time I had to convert seconds to S5Time (S5-155 CPU948 though)
Name :INT->S5T Convert integer seconds to s5t
:DUF integer to bcd
:L KH 0FFF only 3 digits needed
:AW apply binary mask
:L KH 2000 "2" means seconds
:OW apply binary mask
:BE
RE: Siemens S7-400 PID Reset data format
RE: Siemens S7-400 PID Reset data format
You're right. It's not possible to use word at a input which is dword.
However try this:
L ?W x
T ?D y
(where ? stands for: I,Q,M,DB or DI and x,y - is a address)
This will copy your word (consisting of miliseconds) into dword (wow! data type TIME has been created) which you can use as input of FC40.
Regards,
Jacek
Do it right or don't do it at all.
RE: Siemens S7-400 PID Reset data format