Jump to content

fealgr

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by fealgr

  1. It looks that it works, but I think it was my error... The uC answer my request with 2 bytes (something like 0A 89). For these reason I have to use "_CommReadByte" (2 times) instead of "_CommGetline". This way I'm receiving data. So the communication shouldn't be the matter, even if I changed the dll you've posted. I've had some trouble to understand what I received with "_CommReadByte". From the explanation in "CommMG.au3" I expected me 2 string like "0A"and "89", but before both strings will be converted to decimal value (so I receive a string "10" and another "137"). I've a rudimental test system, so I've had difficult to understand. The solution that I've found is: 1) receive byte1 2) convert to hex with function Hex($byte1,2) 3) receive byte2 4) convert to hex with function Hex($byte2,2) 5) concatenate the two hex ($byte_rec = $byte1_hex & $byte2_hex) 6) convert $byte_rec to decimal (Dec($byte_rec)) to obtain the decimal value (the result). Do you think this conversion/result is reliable? Thank you very much!
  2. Hi. I'm new in this forum and first of all I'd like to say hello to everybody! Second ... sorry for my english and third ... I explain my problem: I'm trying to interfacing with a flowcounter and doing it with this nice COMMs UDF. The flowcounter has a serial port connection and the microcontroller returns the counter's value when it receive the character 'a' (0x61). I've tested it with many application (f.ex. LookRS232) and the communication works. At this moment my problem is that I should set the flow control to "None" instead of "hardware" or "XON XOFF". It is possible? I have anyway a doubt: the _CommSetPort returned @error is 0. What does it means? Cheers
×
×
  • Create New...