ecatmod
v2.2.6
Published
Wrapper library for EtherCAT Slave Information data structure parsed with Jsonix
Downloads
313
Readme
Synapticon EtherCAT Model
Wrapper library for EtherCAT Slave Information (ESI) data structure parsed with Jsonix.
Install
$ npm install ecatmod
Usage
const fs = require('fs');
const ecatmod = require('ecatmod');
const contents = fs.readFileSync('esi.xml', 'utf8');
const esi = ecatmod.unmarshalEsiString(contents);
ecatmod.applyToEsi(esi);
Sample ESI files
https://github.com/synapticon/ecatapi/tree/master/public/esi
Development
$ git pull https://github.com/synapticon/ecatmod
$ cd ecatmod
$ npm run watch
Grunt command watches files for changes in src and specs directories and then runs linter and tests and builds documentation.
How to reformat and reindent profile JSON files:
$ npm -g install js-beautify
$ js-beautify --config .vscode/formatter.json -r src/profiles/SNCN.json