Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Mscomm32
Message
De
19/02/1999 07:26:18
Brad Stickley
Parker Pneumatic Div. North America
Wake Forest, Caroline du Nord, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00188996
Message ID:
00189202
Vues:
17
Barbara,

Thank you so much for replying to my request. I was able to find out what was causing the communication problem. Evidently the settings that I was giving at the beginning of the code was somehow interfering with the object. This was odd because the settings were equal. However, when I removed the setup parameters of 9600,n,1 from the click event, it worked!
The application that I am working on is a factory automation project. I work in a manufacturing plant and program apps for in house use. Since this is not my primary job, I have to "relearn" a lot when I use Fox. The communication in this instance is to a controller that feeds information to a robot like device for movement. I am tying into a database of measurments and the operator feedback selects the corresponding measurment from the data.

Once again, thanks for the info.

Brad.


>Brad,
>I found that the Microsoft examples were quite straightforward and worked well. How are you checking for the output? And what are the settings on your buffers? You can set these on the property sheet or right-click on the control and select the bottom Properties item.
>
>Your code looks correct, so it may be an error on the receiving end. I usually checked this by telling the modem to dial. Then it was immediately obvious if I had an error.
>
>HTH
>Barbara
>
>>I am trying to use the mscomm32 control on a form.
>>
>>I the control on the form. A command button and the following code.
>>
>>thisform.olecontrol1.CommPort = 2
>> * 9600 baud, no parity, 8 data, and 1 stop bit.
>>thisform.olecontrol1.Settings = "9600,N,8,1"
>> * Open the port.
>>thisform.olecontrol1.PortOpen=.T.
>> if thisform.olecontrol1.portopen=.f. then
>> messagebox ("Port not open")
>> endif
>>thisform.olecontrol1.Output="GO"
>>thisform.olecontrol1.Output=chr(13)
>>thisform.olecontrol1.PortOpen = .f.
>>
>>
>>I am getting some response with the msg box so I know that the control is working. However, when the port opens fine, the command doesn't seem to go to the port.
>>
>>This is the first time I have used the mscomm32 control and I am not familiar with it.
>>
>>I got the example from microsoft for VB and modified it for Fox.
>>
>>If anyone has any suggestions, I would appreciate the help.
>>
>>Brad.
He is there and He is not Silent.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform