Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Working with multiple com ports
Message
De
23/03/2006 14:52:02
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, États-Unis
 
 
À
23/03/2006 13:46:04
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01107002
Message ID:
01107153
Vues:
23
You can store that in a property and set it when you tell the com server to connect xx port. You may want to user a table to store the results of all the com ports. The table would also store the com port number.


>I will need a number of mycom.server'ers to run each com in its own (DLL or EXE) space.
>
>>Mark,
>>
>>What I would do is create a launcher program that starts the com server that monitors each serial port. Then you can instantiate each com server and then set the com port to monitor. You will have to create a collection class to do this or you could do the same thing with an array. The key is to store an object for each comm port.
>>
>>
>>for lnx = 1 to 6
>>  this.oCommCollection.add(createobject("mycom.server")
>>  this.ocommCollection.setComport(lnx)
>>next
>>
>>
>>
>>>>Fox is single threaded so you may have problems depending on your situation. MSComm will store data in its buffers so you could do some type of polling to handle each comm port separate. Or, you could create a com server and have one com server for each part. That would mean having 6 instances of VFP running at the same time.
>>>>
>>>>>I am working on a solution to accept data from multipe comm ports.I have an executable that has one form. A client program starts that remote server and adds containers, one for every port. I am 'listening' to a port using MScomm activex control. I can I have up to 6 ports/containers running in the same time. I have scanners attached to these com ports. It is very possible that all 6 scanners scan in the same time. Each container uses same form's code to process the scan. That means that potentially multiple containers will call same form's method in the same time. Do I have a problem here? How Fox handles such situation?
>>>>>
>>>>>Thanks for any idea.
>>>Yeah, I thought about it too. I will have to have as many projects as many ports I have. Recompile each project every time I change code.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform