Internet PLC Forum

General => Technical support => Topic started by: mashuli on September 19, 2013, 04:47:04 PM

Title: Custom fuction if
Post by: mashuli 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
Title: Re:Custom fuction if
Post by: support 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.