05-26-2020, 11:16 PM
I'm trying to use this command on Python, but I can´t make it work
How can I use the command SimulationTime()? |
05-26-2020, 11:16 PM
I'm trying to use this command on Python, but I can´t make it work
05-27-2020, 01:20 PM
What issues do you have?
SimulationTime returns the time in seconds. More information here: //www.sinclairbody.com/doc/en/PythonAPI/robo...lationTime
06-02-2020, 02:40 AM
(05-27-2020, 01:20 PM)Albert Wrote:What issues do you have? I define a variable:C1=RDK.Item(“C1”ITEM_TYPE_PROGRAM) Then I run that program, after that I write this:C1.SimulationTime() And the program send me an error: C1.SimulationTime() AttributeError: 'Item' object has no attribute 'SimulationTime' I think I´ts because the type of the Item but I don´t know
06-04-2020, 02:30 PM
The simulation time is a global variable (not item specific). You should use it like this:
Code:
time_seconds = RDK.SimulationTime()
(06-04-2020, 02:30 PM)Albert Wrote:The simulation time is a global variable (not item specific). You should use it like this: I tried like that and the code send me this error: time_seconds = RDK.SimulationTime() AttributeError: 'Robolink' object has no attribute 'SimulationTime'
06-05-2020, 04:34 PM
I recommend you to update RoboDK to the latest version.
|
Users browsing this thread: |
1 Guest(s) |