Jump to content

MichaelXMike

Members
  • Posts

    3
  • Joined

  • Last visited

MichaelXMike's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Thank you for your prompt answer . Another point is that I had 30-40% CPU usage. I mentioned that (into CommMG.au3 ) _CommGetLine includes a sleep(20) delay but _CommGetString does not . So in your (revised) CommgExample.au3 , line 91 If $instr <> '' Then;if we got something ... Endif changed to If $instr <> '' Then;if we got something ... Else sleep(20) ; Mike - reduce CPU usage EndIf Anyway thanks for the great job .
  2. Also when I choose No.Stop '1.5' (stop bits) , it returns '1.5' , not '15' /
  3. Hello , CommgExample.au3 , Line 224 , you set com port as: _CommSetPort($setPort,$sportSetError,GUICtrlRead($CmBoBaud),GUICtrlRead($CmboDataBits),GUICtrlRead($CmBoParity),GUICtrlRead($CmBoStop),$setFlow) But GUICtrlRead($CmBoParity) returns 'none' , but this value should be '0' , not 'none' am I right ? ---------------------------------------------------------------------------------------------------------------------- ; Function Name: _CommSetport($iPort,ByRef $sErr,$iBaud=9600,$iBits=8,$ipar=0,$iStop=1,$iFlow=0,$RTSMode = 0,$DTRMode = 0) ; Description: Initialises the port and sets the parameters ; Parameters: $iPort - integer = the port or COM number to set. Allowed values are 1 or higher. ; NB WIndows refers To COM10 Or higher`as .com10 but only use the number 10, 11 etc ; $sErr - string: the string to hold an error message if func fails. ; $iBaud - integer: the baud rate required. With commg.dll v2.3 and later any value allowed up to 256000. ; With v2.4 any value?? ; If using commg.dll before V2.3 then only allowed values are one of ; 50, 75, 110, 150, 600, 1200, 1800, 2000, 2400, 3600, 4800, 7200, 9600, 10400, ; 14400, 15625, 19200, 28800, 38400, 56000, 57600, 115200, 128000, 256000 ; $iBits - integer: number of bits in code to be transmitted ; $iParity - integer: 0=None,1=Odd,2=Even,3=Mark,4=Space ; $iStop - integer: number of stop bits, 1=1 stop bit 2 = 2 stop bits, 15 = 1.5 stop bits ; $iFlow - integer: 0 sets hardware flow control, ; 1 sets XON XOFF control, ; 2 sets NONE i.e. no flow control.
×
×
  • Create New...