Blackriv3r

MrPLC Member
  • Content count

    4
  • Joined

  • Last visited

Posts posted by Blackriv3r


  1. Yes in this example the 2 condictions are "Prova.Presente := TRUE" and "Prova.Dog[j]= Prova.Presente AND j<10"; In real program the condiction Prova.Presente := TRUE and j<10 doesn't exists. Both are variable (int) from HMI. The cycle "for" must check if i have Prova [1] and then check if i have the Dogs in Prova [1]. Then check if i have Prova [2] and then Dogs. Example If i don't have Prova [2] the Dogs in Prova[2] are all False!

  2. Hello i'm new in Omron plc programming and not very good in english! I have write this code in ST language but have 1 error in compiling it. This is the code: PLC CJ2M Data Types Prova [struct] Members of Prova Dog Bool [10] array of ten boolean bit Presente Bool Symbols Prova [3] Array of 3 elements. I create a new program Max:=3; (uint) Max2:= 10; (uint) FOR i :=1 TO Max BY 1 DO; Prova.Presente := TRUE; FOR j:= 1 TO Max2 BY 1 DO; Prova.Dog[j]= Prova.Presente AND j<10; END_FOR; END_FOR; I get this error Matrix Index not valid. Need some help, maybe indirect addressing?