jjj Posted June 13, 2006 Posted June 13, 2006 Does anyone have a UDF for serial port i/o? What I want to do is set a pin to high or low, and read to see if a different pin is high or low, for use with simple relays. I am wondering about a udf because i have no idea how to program with dll calls. Any help would be appreciated!!!
nfwu Posted June 13, 2006 Posted June 13, 2006 If AutoIt uses the Win32 API for it's FileOpen and FileRead calls, then you can use these functions for serial communication. I said IF! #) TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode()
Chika95 Posted September 26, 2011 Posted September 26, 2011 I have an application for this. Can anyone point me in the right direction to read if a pin is high/low?
martin Posted September 26, 2011 Posted September 26, 2011 (edited) If you want to know the states of one of theses lines - CTS (Clear To Send) signal - DSR (Data Set Ready) signal - RI (ring indicator) signal - RLSD (Receive Line Signal Detect) signal then I have a function _CommGetLineStates in my serial port udf, shown in my signature, which returns the current state (ON or OFF) of each one. If it's not one of those lines then I don't know. EDIT: First said I could add the function but then found I had already done it. Edited September 26, 2011 by martin 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.
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