RS-485 support

I guess there are different chips (chipsets) for RS-485 cards or USB dongles. Are there preferred models which are supported well by FreeBSD? I have to choose some RS-485 card. CAN-bus is alternative but I read it is not supported in FreeBSD.
 
Hmm, normally I would jump to the USB Prolific (PL-xxx) chips for RS-232 but it seems that they don't have the same number of offerings for RS-485 (surprising!).

Waveshare seems the most common on Amazon. It also says it supports Linux which tends to be a good sign.

Not ideal but luckily they all seem cheap enough for the messy strategy of "buy a bunch and see which ones work" ;)

(I had to do that back in the day for the Prolific ones too because they made the terrible decision to brutally break driver support to curb the number of unlicensed clones about 10 years ago. So it was fairly random what chip would work with the driver).
 
what exactly are you planning to do? RS-485 is only an electrical specification, the protocols that are used *over* RS485 vary heavily, and most (all?) of them are a mess.

I suspect (because this is the major use case for RS485 nowadays) you want to interface to modbus?
Then I'd suggest using some simple modbus-tcp adapters like e.g. the elfin ew1x converters. Those can be found very cheaply and offer direct translation for the various modbus variants.
Regarding those variants: modbus is a bloody mess and pure vendor lock-in hell, because every vendor interprets and uses the standard (or a subset of it) a little different or flat out ignores it completely. A small subset of commands might work on all devices, but in general you need the modbus specification for your device to make actual use of it.
 
I have a ICUSB2324852 (appears to be FTDI FT2232H) for modbus and it's recognized and data comes through, although I haven't really got it to read what I want, that could just be misconfiguration on my part.
 
what exactly are you planning to do? RS-485 is only an electrical specification, the protocols that are used *over* RS485 vary heavily, and most (all?) of them are a mess.

I suspect (because this is the major use case for RS485 nowadays) you want to interface to modbus?
Then I'd suggest using some simple modbus-tcp adapters like e.g. the elfin ew1x converters. Those can be found very cheaply and offer direct translation for the various modbus variants.
Regarding those variants: modbus is a bloody mess and pure vendor lock-in hell, because every vendor interprets and uses the standard (or a subset of it) a little different or flat out ignores it completely. A small subset of commands might work on all devices, but in general you need the modbus specification for your device to make actual use of it.
My experience is mostly the opposite. I use ModBus on a handful of different devices (industrial controllers, motor inverters), from multiple vendors, and the ModBus part itself works flawlessly and boring. I do my accesses through Python, using the "minimalmodbus" library.

The part which you might call "a mess" is that there is no rule that says that any two ModBus devices need to resemble each other, be logical, or easy to use. For example, on process controllers (a.k.a. temperature controllers), the current input value (for example the temperature or pressure being controlled) might be a floating-point value at register 528 (decimal), or it might be a long integer value at register 0x1000 (hex). Whether the decimal point is correct in that value or not is often not explained in the documentation (a temperature of 72.34 degrees F might be reported as floating point 72.34 or integer 72 or integer 7234). To figure out whether the temperature is expressed in C or F may not be explained in the documentation, and the user might have to spend half hour reading the documentation for some bizarre and obscure configuration register to figure that out, and use trial and error. Even simple devices (such as a temperature controller) can have several hundred configuration registers. And the documentation usually doesn't explain how the device works (there is no theory of operations), but only explains the details of each individual register seen in isolation. Using industrial control hardware is tedious and annoying for outsiders, but the ModBus part itself is not the problem; for me ModBus just works.
 
Back
Top