loading
 
Access of milisecond
Aman Rana from United States  [31 posts]
20 days
Hello there
Can anybody tell how can I access millisecond in vb script module of Roborealm? or any technique to measure light speed in RR. Thanks in advance for help.
program.robo
Steven Gentner from United States  [267 posts] 17 days
You can use the variable CLOCK_MILLIS to get millisecond timing ... but you will NOT be able to measure the speed of light using this! A PC is way too slow to measure the speed of light. You will need dedicated hardware for that.

For more variables see

http://www.roborealm.com/help/Default_Variables.php

STeven.
Aman Rana from United States  [31 posts] 17 days
Steven
Thanks for update. I am even having issues with CLOCK_MILLIS variable. Am I doing it wrong?
program.robo
Steven Gentner from United States  [1413 posts] 14 days
If you are attempting to time something using that variable ... you cannot change that variable as it will always be overwritten on the next pipeline iteration. I.e. its just a reflection of the milliseconds since you last saw the variable and should NOT be set to anything.

If you wish to time an even something like

myEventStartTrigger = GetVariable("my_event_start_variable_or_some_condition")
if myEventStartTrigger <> 0 then

  SetVariable "MY_EVENT_STARTED_AT", GetVariable("CLOCK_MILLIS")

end if

myEventEndTrigger = GetVariable("my_event_end_variable_or_some_condition")
if myEventEndTrigger <> 0 then

  SetVariable "MY_EVENT_MILLIS_SPAN", GetVariable("CLOCK_MILLIS") - GetVariable("MY_EVENT_STARTED_AT")

end if


which would create a variable MY_EVENT_MILLIS_SPAN with the millseconds between the start and end trigger.

STeven.

Aman Rana from United States  [31 posts] 6 days
One more question. Neato control v1.8 application allow us to access all sensors of Neato Botvac D7. Will it be possible we can read and write those variables through RoboRealm? I am trying to control Neato via RR.
Steven Gentner from United States  [1413 posts] 6 days
Aman,

while this is possible its not an easy task and you would be better off looking for dedicated software that provides this communication. We currently have no plans to integrate that sensor so you would have to accomplish this just using the serial module ... which will be very difficult to do so.

STeven.

 Forum Index