alfredtyaga / real_canopen

LCLS-II Resistive Element Adjustable Length (REAL) heater controller / PWM CANopen slave

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LCLS-II REAL Heater Control

AT90CAN128 (AST-CAN485 board)-based project that interfaces with a Beckhoff PLC via CANopen, controlling 32 PWM outputs using PCA9685 16-channel 12-bit PWM chips.

Object Dictionary

The CANopen object dictionary is provided as both .od and .eds (what Beckhoff TwinCAT3 expects).

Building

The provided Makefile and Atmel Studio 7 project should work directly.

Uploading

A couple tweaks to the Makefile: 1. Change the ARDUINO_ROOT path to point to where you have it installed 2. Change the COM_PORT to the appropriate device

Will also allow you to upload using avrdude like so:

$ make all upload

CANopen library

This repository, in the interests of making a focused and easily compilable example for the AST-CAN485, includes a vendored copy of canfestival-3-asc.

It currently corresponds with the changeset 968:1a25f5151a8d (2018/5/11) from its bitbucket hg repository.

Python

Located in canfestival/objdictgen:

The object dictionary editor program, based on wxPython, still runs on Python 2.7. It requires wxPython 3, which is not available via pip.

To get this working with conda:

$ conda create -n canfestival python=2.7 wxpython==3
$ cd canfestival/objdictgen
$ source activate canfestival
$ pythonw objdictedit.py ../../real_objdict.od

Links

Project template canfestival-3-asc repository AST-CAN485 product page AST-CAN485 schematic AST-CAN485 hookup guide

About

LCLS-II Resistive Element Adjustable Length (REAL) heater controller / PWM CANopen slave


Languages

Language:Python 51.6%Language:C 35.5%Language:Objective-C 11.1%Language:C++ 1.1%Language:Makefile 0.7%Language:HTML 0.0%Language:Shell 0.0%