Following my previous post, If you want I can send you an ASTM simulator by Roche Diagnostics.
-----Message d'origine----- De : TWSocket [mailto:[email protected]] De la part de François Piette Envoyé : mardi 11 mars 2014 18:58 À : 'ICS support mailing' Objet : Re: [twsocket] TWsocketServer and ENQ ascii char > I use the tcp-ip to connect medical devices via the standard protocol ASTM .. ASTM is the name of a standardization organization which probably - among other things - publish the protocol you are using. Is any reference document describing the protocol available? > In ASTM to establish communication with the instrument, we must respond to Ascii character ENQ received by an ACK. > However, it seems from what you have told me that TWsocketserver does not consume the ENQ. > Is there a way to solve this problem? Are you writing a client program or a server program? A client program will connect (that is initiate the connect) while a server program will passively wait for connection. For a client, you should a a TWSocket component. For a server, you should use a TWSocketServer, but each connected client is handled by a TWSocket component. Whatever TWSocket you have, you should turn off line mode (this is off by default anyway). This way, you get an OnDatavailable as soon as the remote part is sending the ENQ. You then call Receive to get hand on the received characters and you can use Send to send the ACK. This is much the same as when using RS232 (I know you use it). The only serious difference is that data is sent by packet. That means you may receive a lot of characters at a time, usually a complete message. -- [email protected] Embarcadero MVP http://www.overbyte.be http://francois-piette.blogspot.com -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be --- Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection avast! Antivirus est active. http://www.avast.com -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
