Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Communication with scale
Message
De
08/08/2009 03:54:59
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Communication with scale
Divers
Thread ID:
01416864
Message ID:
01416864
Vues:
105
I need to establish communication with scale with no documentation of scale.
If I send some string to scale and wait for answer, is this code valid?

thisform.CommObject.Settings = "9600, N, 8, 2" && scale parameters
thisform.CommObject.InputLen = 0
thisform.CommObject.CommPort = 1

IF thisform.CommObject.PortOpen = .F.
thisform.CommObject.PortOpen = .T.
ENDIF

thisform.CommObject.Output = ALLTRIM(thisform.SomeString.value)

Repeat = .T.

DO WHILE Repeat
IF thisform.CommObject.InBufferCount > 0
thisform.SomeField.value = thisform.CommObject.Input

Repeat = .F.
ENDIF
ENDDO

thisform.CommObject.PortOpen = .F.

Will I catch scale answer with this code?

Thanks in advance.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform