Author Topic: Counter values not the same  (Read 11282 times)

cdenk

  • Full Member
  • Posts: 161
  • newbie
    • View Profile
Counter values not the same
« on: April 19, 2013, 10:16:04 AM »
This is Trilogi 6.45 - 05 and 08, T100MD Computer is running Windows 8 Pro, with the recommended Java.

Piece of code from Custfun
 IF " < 10
CTRPV[3] = CTRPV[3] +1
ELSE
CTRPV[3] = 1
ENDIF

In Online monitoring mode:

In the Custfun, select "CTRPV[3]"

Displayed in the lower window:
CTRPV[3]
Current Value (retrieved from PLC) = 0

From the Online monitoring contact value screen
Counter 3 = 1

From, SETLCD 3,20,STR$(CTRPV[3],1)
"1" is displayed on the screen

Recently I had taken advantage of the new feature of defining DM[]'s with names. The program had worked previously, and general runs OK, but appears to be acting as if CTRPV[3] = 0

Any thoughts. I see the new feature where I can use a name in the CTR argument and probably will convert that to names in the future after I get this working. :)