How can I use the command SimulationTime()?——打印Version +- RoboDK Forum (//www.sinclairbody.com/forum) +-- Forum: RoboDK (EN) (//www.sinclairbody.com/forum/Forum-RoboDK-EN) +--- Forum: RoboDK API (//www.sinclairbody.com/forum/Forum-RoboDK-API) +--- Thread: How can I use the command SimulationTime()? (/Thread-How-can-I-use-the-command-SimulationTime) |
How can I use the command SimulationTime()?-will27-05-26-2020 I'm trying to use this command on Python, but I can´t make it work RE: How can I use the command SimulationTime()?-Albert-05-27-2020 What issues do you have? SimulationTime returns the time in seconds. More information here: //www.sinclairbody.com/doc/en/PythonAPI/robolink.html#robolink.Robolink.SimulationTime RE: How can I use the command SimulationTime()?-will27-06-02-2020 (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() 和程序发给我一个错误: C1.SimulationTime() AttributeError: 'Item' object has no attribute 'SimulationTime' I think I´ts because the type of the Item but I don´t know RE: How can I use the command SimulationTime()?-Albert-06-04-2020 The simulation time is a global variable (not item specific). You should use it like this:
Code:
time_seconds = RDK.SimulationTime()
RE: How can I use the command SimulationTime()?-will27-06-04-2020 (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' RE: How can I use the command SimulationTime()?-Albert-06-05-2020 I recommend you to update RoboDK to the latest version. |