On Wednesday 10 January 2007 21:51, Jacob Yocom-Piatt wrote: > i am planning on pulling live rate data from some manufacturing > equipment using a red lion rate meter with RS-232 or 485 interface > > http://www.redlion.net/Products/DigitalandAnalog/Counters/CounterRate >/CUB5.html > > what is the best way to pull this data, using base OS utilities if > possible? if coding this is most expedient, handing me a pointer to a > useful information address is sufficient. > > i'm under the impression that openbsd doesn't support RS-485 > interface cards. do correct me if i'm wrong here. > > cheers, > jake
Hi Jake, I looked over the datasheet/manual for the RS-232/RS-485 interface. http://www.redlion.net/Products/Groups/Counter/Rate/CUB5/Docs/12039.pdf The format of the command strings looks strikingly similar to SCPI, which is often (if not usually) used on IEEE-488/GPIB/HPIB interfaces. http://en.wikipedia.org/wiki/SCPI http://en.wikipedia.org/wiki/IEEE-488 A lot of equipment that has (or supports) SCPI over GPIB will also support the command set over serial. As always, you never get plain vanillia SCPI since every device and every device mfg has their own "good" ideas tossed in as "special" commands. Though it seems like you can talk to the CUB5 with nothing more than a terminal emulator and some typing, doing it manually is really only useful for figuring out which commands you want/need to run. You could automate everything as a shell script using only the utilities in the base install, in short telnet over serial. I usually don't get the luxury of UNIX shell scripting, and often have a cross platform requirement, so I normally do the coding in perl. The following ports will be needed and they have win32 counterparts. /usr/ports/comms/p5-Device-SerialPort /usr/ports/net/p5-Net-Telnet PLEASE BE WARNED: If you have strict timing requirements, particularly machine operator safety requirements (i.e. people operating potentially dangerous machines), the *ONLY* correct way to do machine automation is to use a (hard/soft) real time operating system and write your code in C to enforce your timing. Kind Regards, JCR

