i want to use the SimulationTime for the calculation and i call the Function get.simSimulationTime().
the code as follows:
Code: Select all
if distance_1 < 0.9 then
time_1 = sim.getSimulationTime()
print(time_1)
end
if distance_2 < 0.9 then
time_2 = sim.getSimulationTime()
print(time_2)
end
if time_1 - time_2 > 0 then
sim.setStringSignal("SafetyStop","1")
end
stack traceback
my question is: how can i tranform the data type of simulationtime that i can use it for calculation ?
thank you so much.
Jian