Jump to content

JamesOS2

Members
  • Posts

    10
  • Joined

  • Last visited

Everything posted by JamesOS2

  1. I was thinking the same, that a remote access might help here, the problem is with a regular XP Pro so no 64 bits on that one, the computer is pretty much empty, only has Auto it and lego nxt software, since its a pc currently used only for those 2 programs as a pseudo-developer test platform for my home experiments, since the heavy development and testing is done on a win 7 64 bit laptop. So let me know via private message so we can schedule
  2. Hi Martin, Tried all of the above and still got the same error, quite spooky I might add.
  3. Thanks for the feedback, I know the CommSendString is not the best approach but I wanted to leave the possibility open in case I wanted to send more complex commands in the future and not to debug too much later. I did check the return values but everything did look good to me, so I started to post here to get a better idea of things since I am still too green on Autoit to understand everything properly, I did tried with your test code and believe or not still got the same error. The parameter is not correct port = COM3 channel number = 1 I know that the port is working properly since I used it with another program to send the serial commands manually, but automating with Autoit on win XP is the one to be seen tricky in here, since again on Win 7 everything works as expected.
  4. The code is exactly the one you can see in my comments above, the only thing that changes is the port used based on the pc I test, example: since the Sparkfun Pro Micro 5V/16MHz was detected as COM 9 in my win 7 pc it work fine when I set the COM port as COM9, when I test it in a xp pc the Sparkfun Pro Micro 5V/16MHz was installed on COM 3 so I change the code to use "3", when I tried in another xp pc it got installed on COM7 so I change the COM port to "7"and it did not work, literally my code is too simple I just need to send "1" over the COM port all the magic happens after the Sparkfun Pro Micro 5V/16MHz reads "1" in the COM port where is attached to. ;Include the Serial UDF #include 'CommMG.au3' ;Internal for the Serial UDF Global $sportSetError = '' ;COM Vars Global $CMPort = 7 ; Port Global $CmBoBaud = 9600 ; Baud Global $CmboDataBits = 8 ; Data Bits Global $CmBoParity = "none" ; Parity Global $CmBoStop = 1 ; Stop Global $setflow = 2 ; Flow ;Start up communication with the device _CommSetPort($CMPort, $sportSetError, $CmBoBaud, $CmboDataBits, $CmBoParity, $CmBoStop, $setflow) ;Send Command _CommSendstring("1",0)
  5. Yeah sorry about that, I modified the code to test once more after changing the COM3 to COM7 under its properties to further investigate, currently COM1 and COM2 are used by the pc on other devices from Com4 and onward no devices exist there since I set the Sparkfun Pro Micro 5V/16MHz back to COM3, using the Arduino IDE the system uses and can configure the hardware through COM3, but is not responding while using your or my script, the dll shows V2.79. Running your script to a non existing COM does gives me the "Port does not exist" message but while running mine I get the following error: Can“t perform the operation on a closed port port = COM93 channel number = 1
  6. Com 1 and 3 are integrated to the motherboard, the error was while using your example script and also with mine: ;Include the Serial UDF #include 'CommMG.au3' ;Internal for the Serial UDF Global $sportSetError = '' ;COM Vars Global $CMPort = 7 ; Port Global $CmBoBaud = 9600 ; Baud Global $CmboDataBits = 8 ; Data Bits Global $CmBoParity = "none" ; Parity Global $CmBoStop = 1 ; Stop Global $setflow = 2 ; Flow ;Start up communication with the device _CommSetPort($CMPort, $sportSetError, $CmBoBaud, $CmboDataBits, $CmBoParity, $CmBoStop, $setflow) ;Send Command _CommSendstring("1",0)
  7. Hi Martin, While running your test code I get the Com ports on the dropdown but trying to use the app I get the same error. The parameter is incorrect port = COM3 channel number = 1 Is a new xp pro machine and already checked all Com ports too Thanks
  8. Thanks, I will be testing on Sunday since I have no access to a xp pc till then, I will let you know.
  9. Hi Martin, Thanks, took a while but I have check all COMS from 3 to 8 they work fine with other programs that use the same device, I have reinstalled xp and all the pc drivers and still no luck, for a reason I am getting the same error. Your help is appreciated.
  10. Hi Martin, I am quite new to Autoit and found your COM scripts so useful, I am using the following code to communicate to a Sparkfun Pro Micro 5V/16MHz it works excellent under win 7 ultimate but under win XP Pro I am getting the "The parameter is incorrect port = COM7 channel number = 1" error, according to the other posts is because of the baud rate being too high but I am working in 9600 so it does not look that it could be that, also I am using the version 2.90 of your library, your help is highly apreciated. ;Include the Serial UDF #include 'CommMG.au3' ;Internal for the Serial UDF Global $sportSetError = '' ;COM Vars Global $CMPort = 7 ; Port Global $CmBoBaud = 9600 ; Baud Global $CmboDataBits = 8 ; Data Bits Global $CmBoParity = "none" ; Parity Global $CmBoStop = 1 ; Stop Global $setflow = 2 ; Flow ;Start up communication with the device _CommSetPort($CMPort, $sportSetError, $CmBoBaud, $CmboDataBits, $CmBoParity, $CmBoStop, $setflow) ;Send Command _CommSendstring("1",0)
×
×
  • Create New...