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

plcnext

v0.1.2

Published

A node package for use with PLCnext Technology controllers from Phoenix Contact.

Downloads

13

Readme

plcnext

A node package for use with PLCnext Technology controllers from Phoenix Contact.

Code Example

var plcnext = require("plcnext");

// Create program templates.
var nodeTemplateArray = plcnext.getPrograms("/opt/plcnext/projects/PCWE/Plc/Meta/PCWE.meta.config");

// Create the set of program instances.
var nodeProgramArray = plcnext.getProgramInstances("/opt/plcnext/projects/PCWE/Plc/Plm/PCWE.acf.config", "/opt/plcnext/projects/PCWE/Plc/Esm/PCWE.esm.config");

// Create connections between programs.
var linkDataArray = plcnext.getConnections("/opt/plcnext/projects/PCWE/Plc/Gds/PCWE.gds.config");

// Write program connections back to the PLC.
plcnext.setConnections(linkDataArray, "/opt/plcnext/projects/PCWE/Plc/Gds/PCWE.gds.config")
  

Motivation

This package includes functions for reading and writing information from PLCnext configuration files.
These functions can be used to build node applications that run directly on the PLCnext platform.

Installation

npm install plcnext

API Reference

The schema definition for objects returned by functions are documented separately.

getGlobalObjects ()
Returns an array of global objects from the PLC related to the eCLR, ESM, Axioline bus and Profinet interface.

getIoModules (ticFileName)
Returns an array of IO modules configured in the TIC file.

getProjects ()
Returns an array containing the names of all projects stored on the PLC.

getPrograms (metaConfigFilename)
Returns an array of library/component/program definitions contained in the metadata configuration file.

getProgramInstances (acfConfigFilename, esmConfigFilename)
Returns an array of component/program instances contained in the ACF and ESM configuration files.

getConnections (gdsFileName)
Returns an array of connections contained in the GDS configuration file. Connections may be between ports on program instances, I/O modules or global objects.

setConnections (linkData, gdsFileName)
Writes the connections defined in linkData to the GDS configuration file.

Tests

npm test

Contributors

Please be kind.

History

Version 0.1.0 (12-02-2018) - Initial commit.

License

The MIT License (MIT)

Copyright (c) 2018 Martin Boers

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.