Brian Candler wrote in post #1090294:
> iosu bueno wrote in post #1090230:
>> Brian Candler wrote in post #1089866:
>>> Google "ruby serial port"
>>
>> Im already using serialport gem in my project, but as they say in their
>> page "Ruby/SerialPort is a Ruby library that provides a class for using
>> RS-232 serial ports" so i dont know if I can use it to comunicate via
>> rs485 or just rs232
>
> Have you googled for the difference between RS232 and RS485? Also, you
> haven't said what hardware you want to use to connect your PC to RS485,
> nor what protocol you are going to use, nor what operating system you
> are using.
>
> If this is just a long-reach point-to-point asynchronous serial link,
> then RS232 and RS485 are basically the same thing but with different
> electrical properties. If you are using an RS232-to-RS485 level shifter,
> or an RS485 card with a 16550A-compatible UART, then it will appear just
> like an RS232 serial port.
>
> However if you are trying to do something cleverer, e.g. talk on an
> RS485 shared multipoint bus, you may have more work to do, e.g. turning
> the line driver on and off at the right times. This *might* still be
> drivable like an RS232 serial port, e.g. raising and lowering DTR might
> turn the transmit driver on and off. You'll need to read the
> documentation for the hardware and OS drivers you're using.


Thanks for your answers. I dont understan the difference 100%, not my 
area, I just was asked to investigate if it was "Possible" with Ruby to 
do that. In our application we read consumption meters via modbus with a 
computer using Ubuntu. We want to add support to more meters that 
comunicate using rs485, and it would be cheaper to do it directly 
without any conversor or long software developments.

Sometimes bosses ask for strange things :-) Thanks again for your 
answers and please excuse my english.

-- 
Posted via http://www.ruby-forum.com/.