Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Check comm ports
Message
 
À
27/04/2006 16:29:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01117265
Message ID:
01117302
Vues:
31
But if you can't send and receive some data you won't know if the device is still there :-(

>the port is closed because of a network failure. Lost packets for example.
>I have a wireless device that has a serial comm port.
>>I don't know. But even Scanners must have diagnostic commands. I don't know the logic of your application, and why you want to close the COM, why you not just leave it open?
>>
>>>What do you mean by "send"?
>>>I have a scanner attached to the comm port. Can I send data to it?
>>>>>it would be too easy.
>>>>>MSCOMMControlInstance.PortOpen keeps true value even if you power the device with a comm port down.
>>>>>
>>>>>
>>>>>>>>>Does anyone know if it's possible to regularly check a comm port whether it it is still open? I tried to open a port in the form, then disconnect the device that has a comm port but the form still thinks that the port is open.
>>>>>>>>>Thanks for any idea.
>>>>>>>>
>>>>>>>>How you open and close COM?
>>>>>>>I am using mscomm activex control.
>>>>>>
>>>>>>IF MSCOMMControlInstance.PortOpen && Port is opened
>>>>>>   do whatever you want to do when the port is poened
>>>>>>ENDIF
>>>>>>
>>>>>>***
>>>>>>MSCOMMControlInstance.PortOpen = .f. && Close Port
>>>>>>
>>>>
>>>>This is true. Just try to send some test command to device and see if you'll get the answer. If you don't receive any answer then close the COM.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform