aPAC doesn't set down timers correctly


#1

I’m not sure if the aPAC “app” for android devices is supported or not these days, in light of the advent of Groov, but for a lot of uses, we still find aPAC to be useful, and cheap enough to be feasible.

My problem is that when I try to set the value of a down timer from the aPAC app, it always sets the timer value to zero, no matter what value is entered. Is there an update for aPAC that addresses this, or am I just doing something wrong?

I can successfully set these down timers from the MMI, or from debug mode in the development system. But from aPAC, we dare not try to adjust a timer’s value or it always goes to zero.


#2

Looks like a bug. I’ve forwarded your info to our support team.

I could suggest a not-so-pretty work-around in the meantime, if there’s only one or two values you want to write? It’s it always the same number?


#3

We really need to be able to set these timers to various values as needed for the particular situations. But I can see how you could have some presets built into the program and then select them.

Hopefully I’m not just setting something up wrong.

Thanks.


#4

You’re right, and that is a bug, the app is currently interpreting what you enter as an int where it should be a float.

The not-so-pretty work-around until we have a fix is to convert your value to the equivalent int32, for example, using a calculator like this one: ​https://www.h-schmidt.net/FloatConverter/IEEE754.html

For example, if you wanted to write the value of 8.0 seconds, instead you can write the 0x41000000 or 1090519040. Then it’ll act like you typed in the 8.0 you wanted.


#5

That is a neat calculator! I’m going to bookmark that.

Knowing that this is a bug, and what’s causing it is very handy information.

And I’ve thought of another way we could get around this:

In the strategy, I could set up a group of float variables so there is one associated with each of the down timers.

I’d set them all to zero initially. Then I can have the strategy monitor them all, and if any one changes from zero, I’ll just move that new value into the down timer, then move zero into the variable again, and go back to looking for it to change from zero, ready to do it all again.

That’s sneaky, but it seems like it would work. I’ll try it out when I get to where the system in question is set up later tonight.

Just knowing that it’s not something I’m doing wrong is actually very helpful, and I appreciate your time and the way you, and Opto 22 respond so quickly to our questions. You guys are the best!

Thanks!


#6

OK. I just tried the simple workaround I mentioned above on a test system I have running at home, and that works just fine.

I set up 8 new “Timer Stuff Variable” float variables, one for each of the timers I wanted to test this with, and then made a “Timer Stuffer” chart to perform this conversion task.

The chart simply tests each of the Timer Stuff variables to see if it is equal to zero. If the Timer Stuff variable is zero, it goes on to the next Timer Stuff variable. But if that test is false, then it moves the Timer Stuff variable’s value into the associated timer variable, then moves zero into the Stuff variable, then goes to the next Timer Stuff Variable’s condition block.

This could be put into any constantly-running chart in our strategy. I didn’t really need to set it up as a separate chart but just did that to keep things clean for me for this test.


#7

The one nice thing about doing it this way (writing to a temporary variable) is that you can enable or disable the allowing of operators with the aPAC app to set the timers based on something else.