#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2013
    Posts
    7
    Rep Power
    0

    Send ASCII codes to COM port


    Hi all, I am so new to modern programming, that it's ridiculous. The only programming i have ever done, was very basic, basic on a BBC model B when they was new out (yes - that long ago).

    So - what i need is - a very simple batch file to send ascii commands to a com port.

    I have an 8 channel home automation USB controlled relay board & it's switched using ascii commands. I need to incorporate this into my media centre, to make individual relays respond to remote control signals. A software called event ghost, can run any given program on remote control signal, so i need batch files to link the two together.

    I know it's extremely simple stuff, but i don't do programming & i'm sure somebody could answer this in 20 seconds.

    Thanks in advance.

    Chris
  2. #2
  3. Contributed User
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jun 2005
    Posts
    4,377
    Rep Power
    1871
    Do you mean you have a board something like this ?

    You should post some technical details, such as
    - the board you're trying to talk to (URL's to manufacturer websites are good)
    - your actual OS on your host PC
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2013
    Posts
    7
    Rep Power
    0
    Originally Posted by salem
    Do you mean you have a board something like [URL snipped]this[/URL] ?

    You should post some technical details, such as
    - the board you're trying to talk to (URL's to manufacturer websites are good)
    - your actual OS on your host PC
    H T T P etc... (no w's) protosmart.co.uk/PS-CTL-01001 dot h t m l (not allowed to post a hyperlink or URL)

    OS is windows 7 x64
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2013
    Posts
    7
    Rep Power
    0
    @ECHO OFF

    MODE COM15:9600,N,8,1

    ECHO o4=0<CR>


    I found this & wondered how it would need altering to make it work. Not being a programmer of any description, i don't have a clue.

    the 4 (at o4) is the relay number (there are 8 of) and the =0 is either 0 or 1 meaning off or on.

    HELP - i know it has to be really simple
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2013
    Posts
    7
    Rep Power
    0
    Or how about somebody tell me how to telnet to it & can the telnet info be put into a bat file - run the batch file, which will send the info through telnet ??
  10. #6
  11. Contributed User
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jun 2005
    Posts
    4,377
    Rep Power
    1871
    The link
    http://protosmart.co.uk/PS-CTL-01001.html
    (you'll need a few more posts before you can post actual URL's).

    Have a read of this page
    http://www.avrfreaks.net/index.php?n...ntview&t=68656
    Since the driver for this board you have generates a virtual com port, you should be able to set up the port using a suitable "mode" command, then be able to do things like
    echo "string" > com1:

    The first thing to check is that you can actually talk to the board using say hyperterminal.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper
  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2013
    Posts
    7
    Rep Power
    0
    Originally Posted by salem
    Since the driver for this board you have generates a virtual com port, you should be able to set up the port using a suitable "mode" command, then be able to do things like
    echo "string" > com1:

    The first thing to check is that you can actually talk to the board using say hyperterminal.

    I appreciate the time you're putting into this, but i do know absolutely nothing about programming or how to send the commands, even with hyperterminal connected (it does connect, but thats all i can get it to do).
    I own and run a very succesful computer repair shop, so when it comes to fixing hardware and even windows OS's, i can get straight in there & get it done, but this is completely blagging my head.
    I literally need it in exact text, what i need to do
  14. #8
  15. Contributed User
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jun 2005
    Posts
    4,377
    Rep Power
    1871
    Originally Posted by manufacturer

    Connects to PC through USB port
    Appears as a Virtual Serial (COM) port allowing easy communication with the board through any programming language that supports serial communications
    Simple ASCII protocol to Change/Get Relay status so any Serial terminal program like Hyper terminal can be used

    For example,
    O0=1<ENTER> turns ON Relay 1
    O0=0<ENTER> turns OFF Relay 1

    Led indicators for each Relay, Power & USB
    Screw terminals for Relay connections
    Free Graphical User Interface based software Smart Control
    Controller supported by standoffs at each corner for improved safety
    How much simpler than "run hyperterminal" and press 5 keys do you need it?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper
  16. #9
  17. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2013
    Posts
    7
    Rep Power
    0
    Originally Posted by salem
    How much simpler than "run hyperterminal" and press 5 keys do you need it?
    "INVALID COMMAND" is why i say i need more info on how to do it.

    That suggests to me, that it's not a 'valid command', not that the board isn't accepting the command.

    Am i wrong in presuming that ?
  18. #10
  19. Contributed User
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jun 2005
    Posts
    4,377
    Rep Power
    1871
    I'm assuming at this point that you actually managed to run hyperterm and type something in.

    Did you for example see that the first character is uppercase 'O' and the 2nd character is numeric zero. Unless you post a screen-cap of your attempt, I can believe anything is possible.

    Have you tried the pre-built "smartcontrol" and "simplecontrol" packages?
    Can they talk to the board OK?
    If not, your board may be faulty.

    Have you sent off an email via the "contact us" on their website? Picking random forums and expecting to find people with direct experience of the very board you're using is going to be hit and miss to say the least. There are 1000's of such boards available.

    You say you're in the computer repair business, which means you should have some technical competence at reading documentation and progressing through a sequence of tests to identify causes.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper
  20. #11
  21. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2013
    Posts
    7
    Rep Power
    0
    Originally Posted by salem
    I'm assuming at this point that you actually managed to run hyperterm and type something in.

    Did you for example see that the first character is uppercase 'O' and the 2nd character is numeric zero. Unless you post a screen-cap of your attempt, I can believe anything is possible.

    Have you tried the pre-built "smartcontrol" and "simplecontrol" packages?
    Can they talk to the board OK?
    If not, your board may be faulty.

    Have you sent off an email via the "contact us" on their website? Picking random forums and expecting to find people with direct experience of the very board you're using is going to be hit and miss to say the least. There are 1000's of such boards available.

    You say you're in the computer repair business, which means you should have some technical competence at reading documentation and progressing through a sequence of tests to identify causes.
    Yes.
    Yes.
    Yes.
    Yes.
    Yes.
    And - yes!

    This is getting me absolutely nowhere. Thanks for your attempt, but i'll see if i can find a forum where somebody can actually guide me down the correct path.

IMN logo majestic logo threadwatch logo seochat tools logo