Linas

MrPLC Member
  • Content count

    6
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Linas

  • Rank
    Newbie

Contact Methods

  • ICQ 0
  1. Comparing

    L DB1.DBD0 I have tried to load content of DB1.DBD0 (REAL) its value 160 when I checked the content of accumulator 1 it was = 43200000 (in Hex) why I get this value in accu 1? If I load PIW256 everything goes right - I get the same value in accu1 as specified one in input.
  2. Comparing

    A L 0.0 JNB _003 L "OP3_data (DB1)".VAR_TE1 L MD 4 *R // in this part I use 'multiply real' function MD4 x MD12 = DB1.DBD0 * 27648 T MD 12 A L 0.0 JNB _004 L MD 12 L MD 8 /R // here I divide MD12 / MD 8 ;MD8 = 100 T MD 16 this is real mess I'll try your suggestion
  3. Comparing

    I need to compare analog input PIW256 (WORD) with setpoint that is defined in data block as REAL. Problem is that there are no comparators for WORD format variables. I managed to compare them by using this formula: REAL=WORD*100/27648 code: A I 0.1 = L 0.0 A L 0.0 JNB _001 L 27648 T MD 4 _001: NOP 0 A L 0.0 JNB _002 L 100 T MD 8 _002: NOP 0 A L 0.0 JNB _003 L DB1.DBD0 L MD 4 *R T MD 12 _003: NOP 0 A L 0.0 JNB _004 L MD 12 L MD 8 /R T MD 16 _004: NOP 0 A L 0.0 JNB _005 L PIW 256 ITD T MD 20 _005: NOP 0 A L 0.0 JNB _006 L MD 20 DTR T MD 24 _006: NOP 0 A L 0.0 A( L MD 24 L MD 16 >=R ) S M 0.0 A L 0.0 AN M 0.0 JNB _007 L 27648 T PQW 256 _007: NOP 0 as you can see it took lots of memory MD4 to MD24. IS THERE A MORE SIMPLE WAY TO COMPARE AND GENERATE AN OUTPUT SIGNAL?
  4. S7-300 PID controll

    ok thanks, can you explain why I must call FB41 (CONT_C) in OB35, because it's "cyclic interrupt" block? Maybe it's ok to call FB41 in OB1?
  5. S7-300 PID controll

    ok I'll try to call FB41 in OB35 I tried to call FC1 in OB1. FC1 has the following code: ------------------------------------------------- CALL "CONT_C" , DB41 COM_RST :=FALSE MAN_ON :=FALSE PVPER_ON:=TRUE P_SEL :=TRUE I_SEL :=TRUE INT_HOLD:=FALSE I_ITL_ON:=TRUE D_SEL :=TRUE CYCLE :=T#10S SP_INT :=6.000000e+001 PV_IN :=0.000000e+000 PV_PER :=PIW256 MAN :=FALSE GAIN :=2.000000e+000 TI :=T#20S TD :=T#10S TM_LAG :=T#2S DEADB_W :=0.000000e+000 LMN_HLM :=8.000000e+001 LMN_LLM :=4.000000e+000 PV_FAC :=1.000000e+000 PV_OFF :=0.000000e+000 LMN_FAC :=1.000000e+000 LMN_OFF :=0.000000e+000 I_ITLVAL:=0.000000e+000 DISV :=0.000000e+000 LMN := LMN_PER :=PQW256 QLMN_HLM:= QLMN_LLM:= LMN_P := LMN_I := LMN_D := PV := ER := ---------------------------------------------------------------------------------------- Everything seems to work just fine on PLC Simulator. Now I need to figure out how I can assign a variable instead of fixed value in SP_INT (set point) because setpoint must be set externally from OP3 panel. Thanks.
  6. S7-300 PID controll

    I want to program PID control using standard function block FB41 (it can be found in library). I already analyzed all the parameters and setting it has. The problem is I don’t understand how I can assign a physical input and output to this PID block. Does anyone know where and how I can assign analog input (e.g. thermometer PIW256) to PV_PER (process variable peripheral) of FB41 (CONT_C) block. As well as analog output to LMN_PER of FB41. Another question is how I can call this block in my program. Thanks for any suggestions.