RS-232 device simulator suggestion

Join Date
Aug 2002
Location
Manchester
Posts
527
Hello
I have a device that produces 'endless' serial data that I need to interpret with my PLC. The string has an occasional character within that I daresay I can recognise (ie use this as an end-of-line type character to make sense of what's preceeded it).
This device isn't is my possession, so I need some way of simulating it. I use a few Windows programs (ComDebug being the best) to generate serial strings from my laptop's Com port, but none which I can make produce 'any' data repeatedly. And fast.
Does the collective have an idea of some piece of software I can setup to fire 232 strings endlessly out of my pc to simulate this piece of junk to which I'm trying to interface?
Thanks
Pp
 
If WINDOWS, you can batch file it...
Change COM1 to whatever port you use
Oh, the SPECIAL CHARACTER is $ - about 26 lines in
Code:
 mode COM1 BAUD=9600 PARITY=n DATA=8
 @echo off
 Echo Sending a bunch of junk to COM 1
 Echo Press CTRL-C to quit
:HERE
    echo d >COM1
    echo a >COM1
    echo d >COM1
    echo a >COM1
    echo d >COM1
    echo a >COM1
    echo d >COM1
    echo a >COM1
    echo d >COM1
    echo a >COM1
    echo d >COM1
    echo a >COM1
    echo d >COM1
    echo a >COM1
    echo d >COM1
    echo a >COM1
    echo d >COM1
    echo a >COM1
    echo d >COM1
    echo a >COM1
    echo $ >COM1
    echo d >COM1
    echo a >COM1
    echo d >COM1
    echo a >COM1
    echo d >COM1
    echo a >COM1
    echo d >COM1
    echo a >COM1
    echo d >COM1
    echo a >COM1
    echo d >COM1
    echo a >COM1
    echo d >COM1
    echo a >COM1
    echo d >COM1
    echo a >COM1
    echo d >COM1
    echo a >COM1
    echo d >COM1
    echo a >COM1
    Goto HERE
:QUIT
 
ASCII out

Do you have a spare PLC if not get a small cheap PLC and send it out the serial port with a ASCII out instruction in a loop or cascade.
 
If you're not afraid of some light computer programming, use Python. pyserial works like a charm.
 
I just make a program on whatever is available.

But other than that use a hex editor to make a file. Then send it out to the port with
Code:
copy yourfile com1

Check kwade's reply above how to set the port parameters in windows and make a loop.

An alternative is to repeat the message in the file many, many times. Then you only need to send it once.

This principle should also work on any unix clone including osx, but command will look different.
 
Last edited:

Similar Topics

Hello, I have a linear actuator set up (2 Ewellix linear actuators with hall effect sensor encoders) and an SCU control unit with RS232...
Replies
4
Views
2,082
I am trying to configure driver RS-232 DF1 device for AB SLC 5/04 plc through RS link but its showing error "Failed to find the baud & parity ...
Replies
13
Views
5,894
I have a printer with an old rs-232 multi drop protocol who died recently. The system is old and there is no way to change the protocol for...
Replies
5
Views
3,672
I need to read temperature from an OEM device. OEM device has an RS232 port which is connected to a 1766-NC01 (to micrologix) (I have no coding...
Replies
7
Views
3,151
I have been using plc 5-30 or 40's for a while now in our sawmill aplications. i have been using Vorne brand displays to display error messages...
Replies
7
Views
3,871
Back
Top Bottom