neotrio Posted July 23, 2007 Posted July 23, 2007 Hi all, I have written a script for serial communication which uses MSCOMM functionality......it is working fine for COM port. Now my question is does it also work for USB port? awaiting your response. Neotrio.
tAKTelapis Posted July 23, 2007 Posted July 23, 2007 Erm.. try it? Or, post the code, so someone here can try it.. ?
martin Posted July 23, 2007 Posted July 23, 2007 Hi all, I have written a script for serial communication which uses MSCOMM functionality......it is working fine for COM port. Now my question is does it also work for USB port?awaiting your response.Neotrio.It should work for a serial to usb converter which looks to windows like a com port, but it won't work for talking to devices over usb. With a serial to USB you are actually communicating with the driver for the device which imitates a com port, and the driver handles the usb communications. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
anixon Posted July 23, 2007 Posted July 23, 2007 Hi all, I have written a script for serial communication which uses MSCOMM functionality......it is working fine for COM port. Now my question is does it also work for USB port?awaiting your response.Neotrio.I use NETComm for Serial Port communication which works with both USB and Bluetooth devices. This is a snippet of code which works with a GPS Bluetooth deviceCODE;Error Processing for COM Port$oMyError = ObjEvent("AutoIt.Error", "MyErrFunc");COM Port Error MessageFunc MyErrFunc() MsgBox(0, " GPS/Map Viewer", "COM Port Error : " & $oMyError.description) PLExit()EndFunc ;==>MyErrFunc;Create NETComm.ocx object$NetComm = ObjCreate("NETCommOCX.NETComm");Process message$message = " Establishing GPS Communications."DisplayMessage();Set object settingsWith $NetComm .CommPort = $port ;Set port number .Settings = $settings ;Set port settings .InputLen = 0 ;reads entire buffer .InputMode = 0 ;reads in text mode .HandShaking = 3 ;uses both RTS and Xon/Xoff handshaking .PortOpen = "True" ;opens specified COM portEndWithAnt..
neotrio Posted July 23, 2007 Author Posted July 23, 2007 I use NETComm for Serial Port communication which works with both USB and Bluetooth devices. This is a snippet of code which works with a GPS Bluetooth deviceCODE;Error Processing for COM Port$oMyError = ObjEvent("AutoIt.Error", "MyErrFunc");COM Port Error MessageFunc MyErrFunc() MsgBox(0, " GPS/Map Viewer", "COM Port Error : " & $oMyError.description) PLExit()EndFunc ;==>MyErrFunc;Create NETComm.ocx object$NetComm = ObjCreate("NETCommOCX.NETComm");Process message$message = " Establishing GPS Communications."DisplayMessage();Set object settingsWith $NetComm .CommPort = $port ;Set port number .Settings = $settings ;Set port settings .InputLen = 0 ;reads entire buffer .InputMode = 0 ;reads in text mode .HandShaking = 3 ;uses both RTS and Xon/Xoff handshaking .PortOpen = "True" ;opens specified COM portEndWithAnt..Thanks! actually I had some conceptual clots that's why I was not sure.Now I think my code will also work...........
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now