npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@csllc/cre3100-cli

v3.0.6

Published

CRE-3100 Command Line Interface

Downloads

15

Readme

cre3100-cli

Command Line Utility for CRE3100

To use as a diagnostic utility

Installation: Install NodeJS 8 (e.g., 8.17.0) for your platform (http://nodejs.org)

Navigate to your home folder on your PC's filesystem or whever you save projects and execute the following commands.

git clone [email protected]:csllc/cre3100-cli.git (requires SSH key to be set up with GitHub account) cd ./cre3100-cli npm i

The cre, mdc, slc, and ssb scripts will be available from this directory and must be executed using node.

If you receive an EACCES error, you may need to fix your permissions (https://docs.npmjs.com/getting-started/fixing-npm-permissions) and then retry the installation.

Several utility programs are provided: slc : used when interfacing directly to the SLC card, via an RS-485 cable. ssb : used when interfacing directly to the SSB card, via an RS-485 cable. cre : used when interfacing to the system, or the MDC, via a UART cable.

The utility programs have similar use and command line options. To display the online help, use the -h command line option: node ./slc -h node ./ssb -h node ./cre -h

Connect the adapter cable between your PC and the system or card. The adapter cable will appear as a 'COM' (serial) port on your computer. To find the name of the port, use the cre -l (list ports) option with the cable disconnected; then connect the cable and run the same command again. You should see a new device (COMxx) appear when the command is run with the cable connected. If you do not see the COM port, troubleshoot cable driver installation.

To set the port used by the utility applications, you can either specify it on the command line (cre slaveId --port=COM23 for example), or set it as an environment variable: set MODBUS_PORT=COM23 for Windows PCs export MODBUS_PORT=/dev/cu.usbserial for Macs This will cause the any command run in that command prompt to use the specified port. By opening multiple command prompts and setting the MODBUS_PORT variable, you can monitor multiple systems from the same PC.

The environment variable setting lasts until the terminal window is closed. You can set environment variables permanently on your PC (use google to find instructions).

To Use as an Interface Library

You can use this package as a library to facilitate communication with a CRE-3100 via a serial-port type connection.

The basic steps are as follows: Install the package in your nodejs project: npm install csllc/cre3100-cli.git --save

Establish the physical connection to the device (this may be any of the connection types supported by the cs-modbus library (serial, TCP, etc)).

Create an interface object, supplying the physical connection instance, and the configuration for the MODBUS master. The configuration options are those supported by the cs-modbus library (https://github.com/csllc/cs-modbus)

The interface object will emit a 'connected' event when its initialization is complete (this does not actually communicate with a slave device; it is a confirmation that the initialization is complete and the master is ready to send messages).

An example of reading and writing configuration can be found in examples/generic-simple-serial.js