Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

ControlDesk Automation in dSpace
I am tring to automate controldesk using python. But when i try to run
the control desk automation libraries in a thread the following error
comes up:
 
Traceback (most recent call last):
File "c:\Users\Crispen  Berg\diet_triggering_test_Testing\Matlab

Files\_triggering.py", line 153, in Auto
Instrumentation().ConnectionController.DisableSystemPoll()
File
"C:/dSPACE/Common/Python22/Modules/AutomationLibs/cdautomationlib.py",
line 79, in __init__
File
"C:/dSPACE/Common/Python22/Modules/AutomationLibs/controldesk.py", line
306, in __init__
pywintypes.com_error: (-2147221008, 'CoInitialize has not been
called.', None, None)

The code that produces the error is:
 
import cdacon
from cdautomationlib import *

def
 On_Instrumentation_triggering_dSPACEPush
ButtonControl_1_ButtonDown(OrderInde
x):
thread.start_new_thread(Auto,())



def Auto():
sleep(0.2)
# 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://d
SPACE
NumericInput Control_1","WriteData")
Instrumentation().ConnectionController.EnableSystemPoll()
sleep(0.2)
# 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://d
SPACE
NumericInput Control_1","WriteData")
Instrumentation().ConnectionController.EnableSystemPoll()
sleep(0.2)
# 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://d
SPACE
NumericInput Control","WriteData")
Instrumentation().ConnectionController.EnableSystemPoll()
sleep(0.2)
# triggering://dSPACE NumericInput Control:WriteData
Instrumentation().ConnectionController.DisableSystemPoll()
sleep(0.2)
Instrumentation().Layouts.Item("c:\\users\\ matlab
files\\triggering.lay").Instruments.Item("dSPACE NumericInput
Control").Value = 0.00000000000000000

Instrumentation().ConnectionController.ProcessAnimationEvent("triggering://d
SPACE
NumericInput Control","WriteData")
Instrumentation().ConnectionController.EnableSystemPoll()
sleep(0.2)
Instrumentation().Layouts.Item("c:\\users\\matlab
files\\triggering.lay").Activate()
sleep(0.2)
Instrumentation().Layouts.Item("c:\\users\\matlab
files\\triggering.lay").Activate()


If any body could that would be great
Yours Sincerely

Crispen Berg


Report this thread to moderator Post Follow-up to this message
Old Post
Crispen
05-31-05 02:14 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Matlab archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:36 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.