loading
 
Set Variable using socket program
Anonymous
13 year
hi i have created one variable in by program named "calibrate" when i retrieve the value using socket program ( i am using this to connect to my java code) i get the right value. but when i am trying to set the value for variable its not working. do you think some components have to be checked in that ?

please find the attached robo file.
program.robo
Anonymous 13 year
It is actually working but because the

Set_Variable calibrate=1

is being used that will always set the value of that variable to one regardless of what the API does. You probably want to use the checkbox in that module interface to "Set Once" which means that it will ONLY set the variable to 1 the very first time that module is run and then NEVER set the variable again. Thus, it becomes an initialization only and will not reset that variable if changed from the API.

Conversely you could remove that Set_Variable module and just check for that variable being equal to 0 (zero) as your first case.

Let me know if that does not work for you.

STeven.
Anonymous 13 year
Hi STeven,

it worked with initializing the variable. thanks alot for that. I have one more question...

my robo file analyzes the image and creates a circle's array and returns it  to my Java application... now i am trying to check if the positions have been changed on the board so i try to retrieve the circle's array again even if the positions are changed i cant see that difference in returned circle's array... do you know if i can increase the running time of circle module or keep my "systemState" running all the time...

Nachiket



Anonymous 13 year
Nachiket,

Not sure I understand what you mean by increase the running time of the circle module. Each time a new image is presented via the webcam it should cause the system to run and produce a new array regardless of if the numbers change or not.

If you want to keep the pipeline active with a static image just for testing you can check the Options button->Other->Min Processing FPS and increase that to something other than 0. That will cause the pipeline to run regardless of if a new image is present or not.

Otherwise, can you clarify what you are asking for?

STeven.

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index