Jump to content

adom

Active Members
  • Posts

    49
  • Joined

  • Last visited

adom's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. THX Thoms. Have to workout your infos. Just to be shure: is XON a software flow control? Because often Devices in my case of AV-Systems have no HW-Flow-control.
  2. Hello thoms, it seems you are havy on wire with this project. Can you help me with my 2 questions? Subject: _CommAPI_ReceiveString($hFile, 5000) while counterpart still sending after RX received $vSeparator Important Question. Let's say: If $bSeparator = BinaryMid($vResult, 1 + $iResLength - $iSepLength) Then Return $vResult --> True and Func Returns 1. What happen, if the the counterpart just send a new telegram just in the time of reading Buffer and returning? Could it happen that the 2. telegram blows in nirvana? 2. Generall asked: what happens with the buffer after has been readed and func returns? Will buffer erased or ha to be separately purged by script? THX for answering me.
  3. Next ideas: 1. Check if you have the newest Inludes from http://www.autoitscript.com/w/index.php?title=CommAPI&oldid=12340 #Scripts 2. Use GetCOMPorts Func to see it what commAPI will find comports 3. If you want pls explain what you mean by Bridge? What does it exactly? I am new with comAPI and doing currently my first comm APP. So feel free to ask the community if my ideas are not helpful.
  4. Try to initialize these comports you want with a simulation: http://www.232analyzer.com/232default.htm. To find out if they are already occupied.
  5. CommAPI Examples Hi TheRealHanuta, concerning Sample Script "Slow Devices" I have following Question: Do I have to use _CommAPI_ChangeCommTimeoutsElement($hFile, "ReadTotalTimeoutMultiplier", 100) before every call of _CommAPI_ReceiveData or is it necessary only once while initializing ComPort? THX
  6. Hi Marcsf73, I can confirm : >>>> To fix the problem, I had to delve into the CommInterface.au3 script and modify the function _CommAPI_OpenPort(Const $sMode). It appeared that, on my system, the file with handle $hFile could not be accessed. To allow file access, I had to modify the following statement in the function _CommAPI_OpenPort(Const $sMode) From: Local $hFile = _WinAPI_CreateFile($sFileName, 2, $GENERIC_ALL) Where: $iCreation set to 2 - Opens a file. The function fails if the file does not exist To: Local $hFile = _WinAPI_CreateFile($sFileName, 3, 2+4,2+4) Where: _WinAPI_CreateFile($sFileName, $iCreation [, $iAccess = 4 [, $iShare = 0 [, $iAttributes = 0 [, $pSecurity = 0]]]]) $iCreation set to 3 - Opens a file. If the file does not exist, the function creates the file $iAccess and $iShare set to 2+4; Both 2 - Read and 4 - Write <<<<<<<< After updating all includes from wiki to current version I got the same issues and had to follow: Local $hFile = _WinAPI_CreateFile($sFileName, 3, 2+4,2+4).
  7. Hi Marcsf73, aha as I know now the idea behind I understand. Also understand mismatch with lines. THX
  8. Hi Marcsf73, Sth here is wrong. I checked again : I used the current code at: http://www.autoitscript.com/wiki/CommInterface.au3 See line 116 below The code in the Wiki must have been changed since you copied the snipped with line 116. Your snipped around 116 is now line 84. I double checked the versions on Wiki. The current one is different to your snipped. It must have been changed without adress it to public. Are we still on the right rail now? Is your add on scriptstill valid? And by the way what is the idea behind your _CommGetLine()
  9. Hello Marcsf73, 1. You are right. I have an old comminterface from 10/2013. Newer is fom 3/2014 The information what is newer and what is older should be a little more commucative organized. 2. no I used 2,6 and the old version may be with old version of comminterface other behaviour. Anyway old. 3. Thank you very much for sharing your script!
  10. Hello Therealhanuta, could you pls review the the read/write issue? Can you confirm what Marcsf73 found out?
  11. Hi Atyab, an access denied can't come from Arduino's RS232. I am not familiar with Arduino. But sofar, you have to think in Master Slave. PC is the MAster. Your Arduino have to wait for a Telegram from PC. Your Arduino SW have to wait for Telegrams to get the next Telegram. If you want you can simulate Slave for debugging. For simulating a counterpart I found: http://www.232analyzer.com/232default.htm.
  12. Hi Atyab, I got this, if the port is still open from a before open process. So close it before.
  13. Hello Marc! THX for sharing your ideas. Got 2 questions: 1. I parsed orig func Local $hFile = _WinAPI_CreateFile($sFileName, 2, $GENERIC_ALL) I didn't find the $GENERIC_ALL Var . I found: Local $hFile = _WinAPI_CreateFile($sFileName, 2, 6) Is this correct? 2. In my tests I got no problems with acces of $sFileName. Could it be it is different from system to system? 3. Pls share your func: "I had to write a function to replace _CommGetLine($sEndChar = @CR, $maxlen = 0, $maxtime = 0) found in CommMG.au3. I'll post it if requested." Thank you again sharing your results.
×
×
  • Create New...