Clock Data or Variable Data issue?

I don't understand why this is happening. I have looked through the forum and don't see anyone else having this issue. This should be really simple yet it's happening.


Why does the .GetMillis show a value but when I pass this value to a variable, the variable does not show the value?

The variable is assigned the number zero when it's defined and not a text.. does that even matter?

I was getting into trouble before I think because I was mixing Durations and Instances. I am perfectly fine working with Instances now and working with milliseconds is fine. But I'm past that now and am still having this issue?

I see two possibilities for how global PIMs is zero when you test its value using Do It ...

  • The procedure Diags has never been called, so PIMs remains at its init value
  • Some other place in your code is zeroing out global PIMs.
1 Like

Agreed, two good possibilities. This is a testing procedure and not production, and is being called from the page Initialize module. It is being called before anything else even has a chance to zero it out. So if that really is the case, PIMs should have a value, yes?

I created the Diags procedure to force feed a value to PIMs so I could test the parts of the app that use that variable.

OK so I did some thinking and it IS because of when and where its being called .. I haven't fixed the issue yet but at least I know why its happening and that's what I needed.

Thanks for making me think!

Do 1, then 2


I understand that.. I moved the call to Diags to be the first command in the routine I want to test and then it populated. What I don't understand is why if I call Diags from the page Initialize module it didn't work. That told me its an issue with calling the routine, and not the code of the routine I wanted to test. Call Diags once and give PIMs some value, regardless of when, that's all I wanted.

I will keep working on this.. thanks again.

It's a hard job, but SOMEONE has to do it!

The alternative....


1 Like