C
Crispen
I am having trouble using the ControlDesk automation libraries in
python. In particluiar running the automation in a thread. My code is
as follows, is keeps coming up with this strange error. Any help would
be great.
Crispen
import cdacon
from time import sleep
from cdautomationlib import *
def Auto():
sleep(0.5)
# triggering://dSPACE NumericInput Control_1:WriteData
Instrumentation().ConnectionController.DisableSystemPoll()
Instrumentation().Layouts.Item("c:\\users\\matlab
files\\triggering.lay").Instruments.Item("dSPACE NumericInput
Control_1").Value = 1.0000000000000000
Instrumentation().ConnectionController.ProcessAnimationEvent
("triggering://dSPACE NumericInput Control_1","WriteData")
Instrumentation().ConnectionController.EnableSystemPoll()
sleep(0.5)
# triggering://dSPACE NumericInput Control_1:WriteData
Instrumentation().ConnectionController.DisableSystemPoll()
Instrumentation().Layouts.Item("c:\\users\\matlab
files\\triggering.lay").Instruments.Item("dSPACE NumericInput
Control_1").Value = 0.00000000000000000
Instrumentation().ConnectionController.ProcessAnimationEvent("triggering://dSPACE
NumericInput Control_1","WriteData")
Instrumentation().ConnectionController.EnableSystemPoll()
sleep(0.5)
# triggering://dSPACE NumericInput Control:WriteData
Instrumentation().ConnectionController.DisableSystemPoll()
Instrumentation().Layouts.Item("c:\\users\\matlab
files\\triggering.lay").Instruments.Item("dSPACE NumericInput
Control").Value = 1.0000000000000000
Instrumentation().ConnectionController.ProcessAnimationEvent
("triggering://dSPACE NumericInput Control","WriteData")
Instrumentation().ConnectionController.EnableSystemPoll()
sleep(0.5)
# triggering://dSPACE NumericInput Control:WriteData
Instrumentation().ConnectionController.DisableSystemPoll()
sleep(0.5)
Instrumentation().Layouts.Item("c:\\users\\matlab
files\\triggering.lay").Instruments.Item("dSPACE NumericInput
Control").Value = 0.00000000000000000
Instrumentation().ConnectionController.ProcessAnimationEvent("triggering://dSPACE
NumericInput Control","WriteData")
Instrumentation().ConnectionController.EnableSystemPoll()
sleep(0.5)
Instrumentation().Layouts.Item("c:\\users\\matlab
files\\triggering.lay").Activate()
sleep(0.5)
Instrumentation().Layouts.Item("c:\\users\\matlab
files\\triggering.lay").Activate()
thread.start_new_thread(Auto,())
python. In particluiar running the automation in a thread. My code is
as follows, is keeps coming up with this strange error. Any help would
be great.
Crispen
import cdacon
from time import sleep
from cdautomationlib import *
def Auto():
sleep(0.5)
# triggering://dSPACE NumericInput Control_1:WriteData
Instrumentation().ConnectionController.DisableSystemPoll()
Instrumentation().Layouts.Item("c:\\users\\matlab
files\\triggering.lay").Instruments.Item("dSPACE NumericInput
Control_1").Value = 1.0000000000000000
Instrumentation().ConnectionController.ProcessAnimationEvent
("triggering://dSPACE NumericInput Control_1","WriteData")
Instrumentation().ConnectionController.EnableSystemPoll()
sleep(0.5)
# triggering://dSPACE NumericInput Control_1:WriteData
Instrumentation().ConnectionController.DisableSystemPoll()
Instrumentation().Layouts.Item("c:\\users\\matlab
files\\triggering.lay").Instruments.Item("dSPACE NumericInput
Control_1").Value = 0.00000000000000000
Instrumentation().ConnectionController.ProcessAnimationEvent("triggering://dSPACE
NumericInput Control_1","WriteData")
Instrumentation().ConnectionController.EnableSystemPoll()
sleep(0.5)
# triggering://dSPACE NumericInput Control:WriteData
Instrumentation().ConnectionController.DisableSystemPoll()
Instrumentation().Layouts.Item("c:\\users\\matlab
files\\triggering.lay").Instruments.Item("dSPACE NumericInput
Control").Value = 1.0000000000000000
Instrumentation().ConnectionController.ProcessAnimationEvent
("triggering://dSPACE NumericInput Control","WriteData")
Instrumentation().ConnectionController.EnableSystemPoll()
sleep(0.5)
# triggering://dSPACE NumericInput Control:WriteData
Instrumentation().ConnectionController.DisableSystemPoll()
sleep(0.5)
Instrumentation().Layouts.Item("c:\\users\\matlab
files\\triggering.lay").Instruments.Item("dSPACE NumericInput
Control").Value = 0.00000000000000000
Instrumentation().ConnectionController.ProcessAnimationEvent("triggering://dSPACE
NumericInput Control","WriteData")
Instrumentation().ConnectionController.EnableSystemPoll()
sleep(0.5)
Instrumentation().Layouts.Item("c:\\users\\matlab
files\\triggering.lay").Activate()
sleep(0.5)
Instrumentation().Layouts.Item("c:\\users\\matlab
files\\triggering.lay").Activate()
thread.start_new_thread(Auto,())