My CAN/CANopen projects
CAN Server horch
horch is a TCP/IP based server allowing clients to get access to the CAN bus.
While the TCP/IP site is clear and defined by software the horch server has to handle access to the CAN hardware somehow. On Linux access is granted by the can4linux device driver or by SocketCAN.
horch can be compiled for every Linux machine. Every Desktop PC equipped with an CAN interface which is supported by one of the Linux CAN drivers can4linux or *SocketCAN**. A list of interfaces can be found on the CAN-Wiki.
Very interesting to control machines and other equipment are embedded controllers running Linux. One of the popular ones is the RaspberryPi.
Porting to the JanzTec emPC-A/RPI
The JanzTec emPC-A/RPI is an versatile controller designed to be used in industrial applications. Basically the computing module is a Raspberry PI 2 Model B. But the emPC has a 24V power supply and industrial opto decoupled IOs. To be used as an industrial controller it comes with a ready to use CAN bus interface to extend the on board IOs with industrial grade CANbus controlled remote IOs. An CANopen implementation is available to, developed by emtas GmbH. Here is a list of the most important features:
- Raspberry PI 2 Model B powered
o BCM2836 processor, up to 900MHz quad-core ARM Cortex-A7 CPU
o 1GB LPDDR2 SDRAM
o HDMI graphics output
o 10/100 Mbit/s Ethernet
o 4 x USB 2.0
o Micro SDcard socket
- CAN, ISO/DIN 11898-2 (isolated from logic), jumper switchable 120 Ohm termination resistor
- Console, 9 pin DSUB
- Serial port, RS232 (4 wire) or RS485 (jumper selectable), jumper switchable 120 Ohm termination resistor for RS485
- RTC with battery backup
- 4 x digital OUT (0.5 A max.), 10..32V externally powered (isolated from logic)
- 4 x digital IN (isolated from logic)
Compile horch for JanzTec emPC-A/RPI
make DRV=socketcan TARGET=LINUX
Remember that the CAN bitrate horch is using have to be set using the ip-tools. Check the man page for ip(8). The -b option is not working when horch is compiled for SocketCAN. Call it
$ ./horch -S
For more descriptions check the manual.
A binary can downloaded (41KiB)