Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: eman5oh on January 28, 2019, 01:52:00 PM

Title: Timer instruction
Post by: eman5oh on January 28, 2019, 01:52:00 PM
Not sure if this is an issue or not, but I found by accident that you can end up with a negative value in the timer instruction if you point the timer value to a D address that you have stored an IP address in using the INIT instruction. I have attached an image of an example.
Title: Re: Timer instruction
Post by: franji1 on January 28, 2019, 02:32:48 PM
It's definitely an issue at runtime.  There's nothing stopping the program from using a variable preset, then setting that variable equal to something invalid (e.g. INIT or MOVE or MATH or whatever).

Designer can validate a constant preset to make sure it is positive before downloading it to the PLC.  But if it's a variable, that means it's a runtime decision, which means that the program or HMI determines that value.

If you are using an HMI to enter a variable preset, and the HMI allows you to enter a negative value for a timer, that's not good.  Make sure the HMI only allows valid entries for a specific value.  Most HMI's support some kind of range validation on a specific field/tag.

If you mis-use a register for your Timer Preset (e.g. it's an IP Address), even if the value was valid, your timer won't work correctly (e.g. 10.0.0.1 is a valid Timer Preset, but I doubt that's what you want your Timer timing to).
Title: Re: Timer instruction
Post by: eman5oh on January 28, 2019, 02:38:57 PM
Definitely figured it out pretty quickly when the timer did not behave as expected.
Title: Re: Timer instruction
Post by: ATU on January 29, 2019, 09:08:55 AM
I guess you could use it for controlling a modified DeLorean .  ;)
Title: Re: Timer instruction
Post by: BobO on January 29, 2019, 11:34:48 AM
I guess you could use it for controlling a modified DeLorean .  ;)

Not helpful without 1.12GW. Power cell tech still needs some work.
Title: Re: Timer instruction
Post by: Evilbeard on January 30, 2019, 02:08:55 PM
I guess you could use it for controlling a modified DeLorean .  ;)

Not helpful without 1.12GW. Power cell tech still needs some work.

Mechman makes a 370A alternator...we'd only need to hook up...carries the one...272,523 of them to produce enough current. We could go to a 16V system and we'd only need 204,392 of them!
Title: Re: Timer instruction
Post by: BobO on January 30, 2019, 03:07:13 PM
I guess you could use it for controlling a modified DeLorean .  ;)

Not helpful without 1.12GW. Power cell tech still needs some work.

Mechman makes a 370A alternator...we'd only need to hook up...carries the one...272,523 of them to produce enough current. We could go to a 16V system and we'd only need 204,392 of them!

Perfect. Now we just need something to spin those bad boys...
Title: Re: Timer instruction
Post by: Controls Guy on February 06, 2019, 12:10:05 PM
What, you mean alternators don't just spontaneously produce energy??  Hmmm....this is going to make me rethink using hydrogen as a fuel.....
Title: Re: Timer instruction
Post by: ADC Product Engineer on February 06, 2019, 12:55:05 PM
What, you mean alternators don't just spontaneously produce energy??  Hmmm....this is going to make me rethink using hydrogen as a fuel.....

You need to wind them cross-wise along the vertices and add a prenumbulator before the fizzle drain.  Don't forget that they must spin anti-counterclockwise during the startup whipple sequence.  Adding hydrogen will only increase the flambeant factor which might result in the discharge of the hydraulic ceiling nozzelator.

You don't really need a retroencabulator although it might help.
Title: Re: Timer instruction
Post by: Controls Guy on February 06, 2019, 01:23:23 PM
A retroencabulator is *always* a good idea.