tomkens said:
hi friends
I like to read and write analog input and output in siemence s7-314ifm
if you have any exprience please help me(our plc has 4 analog input and 1 analog output with this address 128,129,130,131 /12bit),I am not sure but one time I read PIW128(with move instruction) and trnsfer it to MW1 but What I read but I think it wasn't right.
thank you
Email:[email protected]
Dear Tomkens.
As you saw,I posted a thread about analog input scaling.I think there are several scaling methods.You can use some ladder companents that are I-DI,DI-R converters ,ADD_R,SUB_R,DIV_R,MUL_R operations.Related program structure is attached as a file.In addition,you can use the FC105 block for scaling and the FC106 block for unscaling in TI-S7 Converting Blocks in S7 Manager.
As far as RRobbins said to me beforehand,in the FC105 block,your PIW128, or what ever the address of the analog input is gone on the "IN" handle. If you have 12 bit analog input module(like SM331),you can divide the analog value to 27648. The range that the analog value can work in goes to HI_LIM and LOW_LIM (like 1000.0 degrees for HI and 100.0 for LOW).So the low value will go to 0(zero)and high value will go to 27648. Bipolar is usually "Always False" and Ret_Val is an error number and your output will be in a REAL format in OUT.But this method is used for lineer scaling.If you have a nonlineer sensor or analog value to execute, you need to perform another method. If you highlight the box and press F1 you should get some help, also.
I don't know whether this knowledge is enough for you.
Best regards.