Search found 20 matches

by jerry
Mon Mar 05, 2012 9:07 pm
Forum: General
Topic: Ruby: Printing out code
Replies: 2
Views: 11157

Re: Ruby: Printing out code

Thanks embedded, it works just as you describe it.
by jerry
Mon Mar 05, 2012 3:45 pm
Forum: General
Topic: Ruby: Printing out code
Replies: 2
Views: 11157

Ruby: Printing out code

Is there a way to print out a block of ruby code in flowstone? I tried selecting the code but the copy function is grayed out. If I could copy it I could then paste it into a text program and print it out. My program is getting longer and longer and I would like to document it.
by jerry
Sun Mar 04, 2012 3:35 am
Forum: General
Topic: Ruby: while statement
Replies: 6
Views: 21236

Re: Ruby: while statement

I see how the repeating if statement is equivalent to a while statement but I have not found a way to break out of the event method. If I add a "break" statement in the else loop I get an invalid break error. See below.

else
output 0, "Not Looping"
@count = 0
output 1, @count
break if @ins[0 ...
by jerry
Thu Mar 01, 2012 3:02 pm
Forum: General
Topic: Ruby: while statement
Replies: 6
Views: 21236

Re: Ruby: while statement

Thanks for the very useful code, I see the delay is working and definitely needed, if I reduce it from .01 to .001 flowstone has an error.
by jerry
Mon Feb 27, 2012 8:53 pm
Forum: General
Topic: Ruby: while statement
Replies: 6
Views: 21236

Re: Ruby: while statement

I tried the event method you provided and I see how it continuously loops, but is there a way to exit out of that loop? Like a while statement I want to loop until a condition is met, perform an action, then exit out of the loop.

I am converting qbasic code that uses while loops and is working fine ...
by jerry
Sun Feb 26, 2012 5:23 pm
Forum: General
Topic: Ruby: while statement
Replies: 6
Views: 21236

Ruby: while statement

I wanted to use a while statement to loop in ruby until a limit switch was pressed.
Ruby gives an error : "excessive processing detected"
See code below:

while @ins[0] == false do
end

Please advise how to suspend operation until an event occurs.
by jerry
Thu Feb 23, 2012 3:53 pm
Forum: General
Topic: Ruby: sleep 10
Replies: 0
Views: 9487

Ruby: sleep 10

Including sleep 10 in ruby code causes an error:
excessive processing detected. This ruby component has been turned off.

Should the sleep command be avoided in Ruby?
by jerry
Mon Feb 13, 2012 1:56 am
Forum: General
Topic: Flowstone Ruby guides
Replies: 1
Views: 9181

Re: Flowstone Ruby guides

I agree more documentation for Ruby is needed, as an example I could not find the following Ruby method mentioned in the User Guide: v.drawBitmapSection
This method is in the vintage LED Ruby code for the draw knob module.
by jerry
Thu Feb 09, 2012 2:09 pm
Forum: Machine Control
Topic: Ruby code for Machine Controller
Replies: 8
Views: 108735

Re: Ruby code for Machine Controller

Thanks for the tip on Ruby and providing a less complicated menu selector. I agree my menu selector was overly complicated and getting more so as I added more menu items!
by jerry
Mon Feb 06, 2012 7:23 pm
Forum: Machine Control
Topic: Ruby code for Machine Controller
Replies: 8
Views: 108735

Re: Ruby code for Machine Controller

I added an image file for the controller.