loading
 
Access of milisecond
from United States  [36 posts]
5 year
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  [273 posts] 5 year
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.
from United States  [36 posts] 5 year
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  [1446 posts] 5 year
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.

from United States  [36 posts] 5 year
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  [1446 posts] 5 year
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.

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