Author Topic: Custom fuction if  (Read 12190 times)

mashuli

  • Newbie
  • Posts: 5
  • I'm a llama!
    • View Profile
Custom fuction if
« on: September 19, 2013, 04:47:04 PM »
Using diff customer function, how can I use If to compare counter values or use the counter value at certain point to perform other math application? can I access the counter values on run? where the current counter value is located in memory so I can access it? I want to do something like

if the current value of counter 1= > 5 do....
else if the current value of counter 1<5 do ...
end if

Thanks

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Custom fuction if
« Reply #1 on: September 19, 2013, 04:56:31 PM »
Yes, all counter present values are accessible as CTRPV[1] to CTRPV[64]. You can read or write to them.

Timer present values are accessible as TIMERPV[1] to TIMERPV[64]

The set values are only accessible using the function GETTIMERSV and GETCTRSV.

Email: support@triplc.com
Tel: 1-877-TRI-PLCS