9/17/2012 2:52 PM | |
Posts: 10 Rating:
|
Hi I have the same problem with TIA portal 11 sp2 and s7 1200 v2.2. The next code whant't compile.
|
9/17/2012 3:17 PM | |
Joined: 7/7/2010 Last visit: 9/11/2024 Posts: 15174 Rating:
|
I have the latest version of portal and same firmware on my 1214. WORD_TO_BLOCK_DB does not show up as option for me. This thread shows what you need to do for s7-1200: https://support.automation.siemens.com/WW/llisapi.dll?func=cslib.csinfo&objId=59613054&nodeid0=29156492&load=treecontent&lang=en&siteid=cseus&aktprim=0&objaction=csview&extranet=standard&viewreg=WW |
Last edited by: huggy_d1 at: 9/17/2012 4:02 PM-- unable to post code to the forum normally -- Last edited by: huggy_d1 at: 9/17/2012 4:02 PMThis is untested but from the above linked FAQ: <textarea name="code" class="c#" style="height:100px" rows="15" cols="100">// from Siemens FAQ: https://support.automation.siemens.com/WW/llisapi.dll?func=cslib.csinfo&objId=59613054&nodeid0=29156492&load=treecontent&lang=en&siteid=cseus&aktprim=0&objaction=csview&extranet=standard&viewreg=WW // note, prevents read/write in same operation; to enable read to get current value before setting new value, // make it 2 if statements // IF #read THEN // Statement section IF #out_word := PEEK(area:=16#84, dbNumber:=(#dbNum+0), byteOffset:=(#byteOffset+0)); // ELSIF #write THEN // Statement section ELSIF #out_word :=0; POKE(area:=16#84, dbNumber:=(#dbNum+0), byteOffset:=(#byteOffset+0), value:=#in_word); END_IF;</textarea> Last edited by: huggy_d1 at: 9/17/2012 4:01 PMscience guy |
|
Follow us on