selinrv

MrPLC Member
  • Content count

    4
  • Joined

  • Last visited

Community Reputation

0 Neutral

About selinrv

  • Rank
    Hi, I am New!

Profile Information

  • Country Ukraine
  1. Absolute value in ST

    The thing is it's working, but not as needed. It just divides Sum1 on Nsum in real values, but not stores SUM1 values and divides them on Nsum value (Nsum is number of values stored in SUM1)    
  2. Absolute value in ST

    Hi everybody I'm trying to create a code to count an absolute value from my Q64AD module. I found absolute value function ABS, but its working somewhat strange, and i do not see the difference between real value and absolute value. Then I created a timer for an absolute value with some mathematics: SUM1:= SUM1 + napr1; Nsum := Nsum + 1; IF timer_sr.Q THEN timer_sr(IN:= NOT timer_sr.Q , PT:= T#100ms); outsr := SUM1 /Nsum; Nsum := 0; SUM2 := 0; END_IF;   where napr1 - is value from Q64AD module ch1. It worked on codesys, but not working here. Data type of sum1, napr1, nsum is Word[signed]. In codesys Nsum was INT type. What's the difference and what i did wrong?
  3. timer question

    Thanks for your answer, already figured out whats wrong. Changed timer limit setting in PLC parameter and everything works
  4. timer question

    Sorry for bringing up old topic I want to setup PT time of TON to 30ms, but i can't setup value lower than 100ms. Its Q00UJCPU and GX Works 2