@synapticon/motion-master-client

Library and CLI tool for interacting with [Motion Master](https://github.com/synapticon/motion-master).


Keywords
ethercat, motion-master, pdo, sdo, zeromq
License
MIT
Install
npm install @synapticon/motion-master-client@1.5.8

Documentation

Motion Master Client

Library and CLI tool for interacting with Motion Master.

Install

sudo npm --unsafe-perm=true install -g @synapticon/motion-master-client

Command line usage

See the examples in test.sh.

Usage: cli [options] [command]

Options:
  -V, --version                                                                                                   output the version number
  -c, --config <path>                                                                                             path to JSON config file to read and replace the default values with
  -d, --device-address <address>                                                                                  device address (uint32) generated by Motion Master - takes precedence over device position
  -f, --output-format <json|yaml>                                                                                 if left unspecified the output format is the default colored message inspect
  -p, --device-position <position>                                                                                used when device address is not specified (default: 0)
  -h, --help                                                                                                      output usage information

Commands:
  request [options] <type> [args...]
  upload [params...]
  download [paramValues...]
  getDeviceFileContent <filename>
  getDeviceLogContent
  getCoggingTorqueDataContent
  startCoggingTorqueRecording [options]
  startOffsetDetection
  startPlantIdentification <durationSeconds> <torqueAmplitude> <startFrequency> <endFrequency> <cutoffFrequency>
  monitor [options] <topic> [params...]

request

Usage: request [options] <type> [args...]

Options:
  -i, --interval <value>  sending interval in microseconds (default: 1000000)
  -h, --help              output usage information

Request <type>s:
  pingSystem
  getSystemVersion
  getDeviceInfo
  getDeviceParameterInfo
  getDeviceParameterValues
  getMultiDeviceParameterValues
  setDeviceParameterValues
  setMultiDeviceParameterValues
  getDeviceFileList
  getDeviceFile
  setDeviceFile
  deleteDeviceFile
  resetDeviceFault
  stopDevice
  startDeviceFirmwareInstallation
  getDeviceLog
  startCoggingTorqueRecording
  getCoggingTorqueData
  startOffsetDetection
  startPlantIdentification
  computeAutoTuningGains
  setMotionControllerParameters
  enableMotionController
  disableMotionController
  setSignalGeneratorParameters
  startSignalGenerator
  stopSignalGenerator
  startMonitoringDeviceParameterValues
  stopMonitoringDeviceParameterValues

monitor

Usage: monitor [options] <topic> [params...]

Options:
  -i, --interval <value>  sending interval in microseconds (default: 1000000)
  -h, --help              output usage information

Library usage

const input = new rxjs.Subject<Buffer>();
const output = new rxjs.Subject<Buffer>();
const motionMasterClient = new MotionMasterClient(input, output);
const messageId = v4(); // '4e4d938e-1021-4b68-ad01-38c7ed2c5ee4'
const getSystemVersion: motionmaster.MotionMasterMessage.Request.IGetSystemVersion = {};
motionMasterClient.sendRequest({ getSystemVersion }, messageId);
motionMasterClient.systemVersion$.subscribe(console.log);

Publish

npm publish --access=public