WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1  
Old 06-30-2008, 05:35 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
From the error you are getting the problem seems to be that you are trying to open the same COM port multiple times, which is failing. Instead of having multiple files for each operation, I would suggest using one file and implementing each operation as a function in the file. This way, you can open the serial port once in the global scope of the file and all the functions can use the existing handle to it.
Reply With Quote
  #2  
Old 07-01-2008, 09:44 AM
Uttama_vizard Uttama_vizard is offline
Member
 
Join Date: Sep 2007
Posts: 60
Hello,

Yes, of course that would be the easiest solution. I have tried that out and it works. In fact, if I open and close the COM port multiple times from the same .py file, there is also no error. What, I feel that trying to access the same COM port simultaneously from different files is giving errors due to synchronization problem.

But, my application demands that I use separate .py files and one master .py file for managing the different .py files. I have found out a solution to this and now it is working fine.

What I have done is that I have tried to write in a separate .txt file some message conveying the end of execution of one .py file and then I have tried to access that .txt file, check its contents and when the condition matches, I have made my master .py file to recognize that as an event marker.

Now, it is working fine.

Thanks for your valuable suggestion.

Uttama
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Read file....many issues Uttama_vizard Vizard 9 07-08-2008 02:16 PM
Failed to load wav file BrynJ Vizard 1 04-24-2008 09:35 AM
Could not find plugin to load objects... halley Vizard 1 05-30-2006 11:01 AM
file input vsully Vizard 1 12-21-2004 10:51 PM
Closing file handles from within function FlyingWren Vizard 1 10-01-2003 06:02 PM


All times are GMT -7. The time now is 03:00 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC