Jump to content

Recommended Posts

Posted

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.

Posted

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.

Posted (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 by careca
  Reveal hidden contents

IUIAutomation - Topic with framework and examples

Au3Record.exe

Posted

Hello. You just need to find a COM library around the forum. Then send the correct Command to the COM port.

 

Saludos

Posted

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.

Posted

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

 

Posted

i think @AdamUL is right.  Here is my flavor of Plink command organization (with bonus pipe to log)

 

 

  Reveal hidden contents

Posted

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?

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...