DrPickles Posted November 6, 2018 Share Posted November 6, 2018 After googling a large portion of my day away, I found I am stuck I have purchased a rs485 usb dongle “USB to RS485 Converter Adapter ch340” to be exact With a r421a08 Relay board. I can turn relays on and off using a python test script. (https://github.com/Erriez/R421A08-rs485-8ch-relay-board) I would like to be able to send commands using autoit. I have tried to use putty and send commands, but I have no idea how to do so. If some one can give an example on how to turn on and off a relay, I would be much obliged. Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted November 6, 2018 Share Posted November 6, 2018 3 hours ago, DrPickles said: I would like to be able to send commands using autoit. Does this Python script have a GUI? Does it accept command line parameters? Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
DrPickles Posted November 6, 2018 Author Share Posted November 6, 2018 it does, and yea I compiled it to an EXE for a run as…But my goal is to make my own EXE with the command in autoit. Cascading EXEs really seems like a, not good idea. Link to comment Share on other sites More sharing options...
careca Posted November 6, 2018 Share Posted November 6, 2018 (edited) It may be possible to convert the code, but i know nothing of python. I guess you'd have to go through python and find the equivalent in autoit. Step by step, communicate with the correct port Edited November 6, 2018 by careca Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe Link to comment Share on other sites More sharing options...
Danyfirex Posted November 6, 2018 Share Posted November 6, 2018 Hello. You just need to find a COM library around the forum. Then send the correct Command to the COM port. Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
DrPickles Posted November 8, 2018 Author Share Posted November 8, 2018 I imagine that I could turn on the relay with putty if that were the case. anyone have any ideas as how to do this manually? if I can do it though putty I can do it though autoit. I wonder if the issue is with the relay board and how it expects to be treated more then the serial usb dongle. Link to comment Share on other sites More sharing options...
Skeletor Posted November 8, 2018 Share Posted November 8, 2018 I assume you are using the Modbus protocol? Kind RegardsSkeletor "Coffee: my defense against going postal." Microsoft Office Splash Screen | Basic Notepad Program (Beginner) | Transparent Splash Screen | Full Screen UI Link to comment Share on other sites More sharing options...
AdamUL Posted November 8, 2018 Share Posted November 8, 2018 If you want to use PuTTY with the command line, try using Plink. There are different Plink UDFs around the forum. Here's the one I used to connect to a Mac computer, but you should be able to use the Plink functions for what you need. Adam Link to comment Share on other sites More sharing options...
DrPickles Posted November 8, 2018 Author Share Posted November 8, 2018 11 hours ago, Skeletor said: I assume you are using the Modbus protocol? just putty over com port, is this something that is not text driven? Link to comment Share on other sites More sharing options...
iamtheky Posted November 8, 2018 Share Posted November 8, 2018 i think @AdamUL is right. Here is my flavor of Plink command organization (with bonus pipe to log) ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
DrPickles Posted November 8, 2018 Author Share Posted November 8, 2018 I guess the issue is, I have no idea what to send to this com port plink prompt. I have tried things like "com4 1 on 3" which translates to send to com 4 channel 1 turn relay 3 on. Is this an issue with me not sending hex? is Com supposed to be capitalized? do I need to send the relay in binary? Link to comment Share on other sites More sharing options...
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