ControlDesk Automation in dSpace

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,())
 
?

=?iso-8859-1?q?S=E9bastien_Boisg=E9rault?=

Crispen a écrit :
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():
[... skip ...]
thread.start_new_thread(Auto,())

Crispen,

I am afraid that you won't find many dspace users on
comp.lang.python. The code you produced is quite hard
to read, we lack some info about the context of your
app and you didn't provide what the error you encounter
is ...

Maybe you should provide a minimal python code that
does not work, and give us the corresponding error
message.

If it is Python related, I guess that you'll probably
get a reply. If it is related to dspace, maybe you
should try comp.soft-sys.matlab (?), or any other group
that may discuss dspace issues.

Regards,

Seb
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top