classicladder -fix sequential variable access

step timing was incorrectly mapped on to word variables.
step timing variables could not be selected to watch or evaluate.

Signed-off-by: Chris Morley <chrisinnanaimo@hotmail.com>
This commit is contained in:
Chris Morley 2017-01-28 21:48:33 -08:00
parent 1f29c7cf5b
commit e4aa855729
2 changed files with 3 additions and 3 deletions

View file

@ -97,7 +97,7 @@ int ReadVar(int TypeVar,int Offset)
#ifdef SEQUENTIAL_SUPPORT #ifdef SEQUENTIAL_SUPPORT
case VAR_STEP_TIME: case VAR_STEP_TIME:
// return Sequential->Step[ Offset ].TimeActivated/1000; // return Sequential->Step[ Offset ].TimeActivated/1000;
return VarWordArray[NBR_WORDS+Offset]; return VarWordArray[NBR_WORDS+NBR_PHYS_WORDS_INPUTS+NBR_PHYS_WORDS_OUTPUTS+Offset];
#endif #endif
#ifdef OLD_TIMERS_MONOS_SUPPORT #ifdef OLD_TIMERS_MONOS_SUPPORT
case VAR_TIMER_PRESET: case VAR_TIMER_PRESET:
@ -173,7 +173,7 @@ void WriteVar(int TypeVar,int NumVar,int Value)
break; break;
#ifdef SEQUENTIAL_SUPPORT #ifdef SEQUENTIAL_SUPPORT
case VAR_STEP_TIME: case VAR_STEP_TIME:
VarWordArray[NBR_WORDS+NumVar] = Value; VarWordArray[NBR_WORDS+NBR_PHYS_WORDS_INPUTS+NBR_PHYS_WORDS_OUTPUTS+NumVar] = Value;
break; break;
#endif #endif
#ifdef OLD_TIMERS_MONOS_SUPPORT #ifdef OLD_TIMERS_MONOS_SUPPORT

View file

@ -70,8 +70,8 @@ StrConvIdVarName TableConvIdVarName[] = {
{ "IF%d", VAR_PHYS_FLOAT_INPUT, 0, /*sizes*/ NBR_PHYS_FLOAT_INPUTS_DEF, -1, -1, /*offsets */ 0, 0, 0, FALSE }, { "IF%d", VAR_PHYS_FLOAT_INPUT, 0, /*sizes*/ NBR_PHYS_FLOAT_INPUTS_DEF, -1, -1, /*offsets */ 0, 0, 0, FALSE },
{ "QF%d", VAR_PHYS_FLOAT_OUTPUT, 0, /*sizes*/ NBR_PHYS_FLOAT_OUTPUTS_DEF, -1, -1, /*offsets */ 0, 0, 0, TRUE }, { "QF%d", VAR_PHYS_FLOAT_OUTPUT, 0, /*sizes*/ NBR_PHYS_FLOAT_OUTPUTS_DEF, -1, -1, /*offsets */ 0, 0, 0, TRUE },
{ "E%d", VAR_ERROR_BIT, 0, /*sizes*/ NBR_ERROR_BITS_DEF, -1, -1, /*offsets */ 0, 0, 0, TRUE }, { "E%d", VAR_ERROR_BIT, 0, /*sizes*/ NBR_ERROR_BITS_DEF, -1, -1, /*offsets */ 0, 0, 0, TRUE },
{ "X%d", VAR_STEP_ACTIVITY, 0, /*sizes*/ NBR_STEPS, -1, -1, /*offsets */ 0, 0, 0, FALSE },
{ "X%d.V", VAR_STEP_TIME, 0, /*sizes*/ NBR_STEPS, -1, -1, /*offsets */ 0, 0, 0, FALSE }, { "X%d.V", VAR_STEP_TIME, 0, /*sizes*/ NBR_STEPS, -1, -1, /*offsets */ 0, 0, 0, FALSE },
{ "X%d", VAR_STEP_ACTIVITY, 0, /*sizes*/ NBR_STEPS, -1, -1, /*offsets */ 0, 0, 0, FALSE },
{ NULL, 0, 0, /*sizes*/ 0, 0, 0, /*offsets */ 0, 0, 0, FALSE } //END { NULL, 0, 0, /*sizes*/ 0, 0, 0, /*offsets */ 0, 0, 0, FALSE } //END
}; };