If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
Custom Ticker not ticking when first starting
8 posts
• Page 1 of 1
Custom Ticker not ticking when first starting
FlowStone 3.0.1, windows 7
I have found that when I use the "Ticker - Custom" they do not tick when I initially strat the program, I have to go in and remove the "On" check mark and then replace it. Once I do that it works fine until I close the program and reopen it. Any thoughts?
I have found that when I use the "Ticker - Custom" they do not tick when I initially strat the program, I have to go in and remove the "On" check mark and then replace it. Once I do that it works fine until I close the program and reopen it. Any thoughts?
- Attachments
-
- Ticker.JPG (49.2 KiB) Viewed 21034 times
- dange11
- Posts: 2
- Joined: Mon Dec 10, 2012 2:24 pm
Re: Custom Ticker not ticking when first starting
Yeh i came across this a few days ago. It's a simple fix.
Add this line to the code...
output 0,t
Just like i have below with the smilely face.
.
def init
# Time step in secs
@step = 0.1
# Whether the timer has started ticking
@ticking = false
end
def event i,v,t
case i
when 0
if !@ticking && @state
@ticking = true
input 100,nil,t+@step
output 0,t
end
if @state
@step = 0.001 if @step <= 0
output 0
input 100,nil,t+@step
else
@ticking = false
end
end
end
Add this line to the code...
output 0,t
Just like i have below with the smilely face.
.
def init
# Time step in secs
@step = 0.1
# Whether the timer has started ticking
@ticking = false
end
def event i,v,t
case i
when 0
if !@ticking && @state
@ticking = true
input 100,nil,t+@step
output 0,t
end
if @state
@step = 0.001 if @step <= 0
output 0
input 100,nil,t+@step
else
@ticking = false
end
end
end
BV MUSIC SYDNEY AUSTRALIA..Songwriting and Software development
Headquartershttps://www.bvmusicsydneyaustralia.com/
Spotifyhttps://open.spotify.com/artist/7JO8QM40mVmHb7pAwKPJi0
Donatationhttps://www.paypal.com/donate/?hosted_button_id=HEUR8R7K8GZ4L
Headquartershttps://www.bvmusicsydneyaustralia.com/
Spotifyhttps://open.spotify.com/artist/7JO8QM40mVmHb7pAwKPJi0
Donatationhttps://www.paypal.com/donate/?hosted_button_id=HEUR8R7K8GZ4L
- billv
- Posts: 1157
- Joined: Tue Aug 31, 2010 3:34 pm
- Location: Australia
Re: Custom Ticker not ticking when first starting
Thank you for the reply, I added the line, to include the smiley face, and the ticker would not initially start ticking until I removed and reinserted the check mark in the on box. I even tried it without the smiley face with no better results
- dange11
- Posts: 2
- Joined: Mon Dec 10, 2012 2:24 pm
Re: Custom Ticker not ticking when first starting
Try this:
- Code: Select all
def init
# Time step in secs
@step = 0.1
# change timer id
@timerID = (@timerID.nil? || !@timerID.integer?) ? 0 : @timerID+1
# Whether the timer has started ticking
@ticking = false
input 200, nil
end
def event(i,v,t)
if (i == 100)
@ticking = @state
if ((@ticking) && (v == @timerID))
output(0)
@step = 0.001 if (@step <= 0)
input(100,@timerID,t+@step)
end
else
if ((!@ticking) && (@state))
@ticking = true
input(100,@timerID,t+@step)
end
end
end
-
MyCo - Posts: 718
- Joined: Tue Jul 13, 2010 12:33 pm
- Location: Germany
Re: Custom Ticker not ticking when first starting
dange11 wrote:removed and reinserted the check mark in the on box
That's a clue to the easy way - by doing this you are sending a trigger into the input, causing an event which sets the timer running.
So the simplest way to make sure it automatically starts ticking is to simply put an "After Load" (and "After Duplicate" possibly) connected to the same Ruby input as the on/off checkbox.
That will give it the 'kick' it needs to get running at load time.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: Custom Ticker not ticking when first starting
MyCo wrote:Try this:
Ummm.....I'm not getting a result here Myco. It's behaving like the original ticker, waiting
the "step" time before it sends the first trigger. Put in a step value like"1", easier to notice
what i mean.
BV MUSIC SYDNEY AUSTRALIA..Songwriting and Software development
Headquartershttps://www.bvmusicsydneyaustralia.com/
Spotifyhttps://open.spotify.com/artist/7JO8QM40mVmHb7pAwKPJi0
Donatationhttps://www.paypal.com/donate/?hosted_button_id=HEUR8R7K8GZ4L
Headquartershttps://www.bvmusicsydneyaustralia.com/
Spotifyhttps://open.spotify.com/artist/7JO8QM40mVmHb7pAwKPJi0
Donatationhttps://www.paypal.com/donate/?hosted_button_id=HEUR8R7K8GZ4L
- billv
- Posts: 1157
- Joined: Tue Aug 31, 2010 3:34 pm
- Location: Australia
Re: Custom Ticker not ticking when first starting
there was also this problem with a time and date module
viewtopic.php?f=3&t=1133
at the end we solved it like this:
in this example it ticks every second (t+1) you just need to calculate the time, the ticker is always running.
viewtopic.php?f=3&t=1133
at the end we solved it like this:
- Code: Select all
def init
input 100,nil
end
def event i,v,t
output 0
input 100,nil,t+1 #time+1sec
end
in this example it ticks every second (t+1) you just need to calculate the time, the ticker is always running.
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
Re: Custom Ticker not ticking when first starting
Yes, if the on/off switch is not required, that is the best way - much less Ruby processing too when all those other variables etc. are removed.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
8 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 87 guests