Skip to content

ericlowry/sartorius-sbi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sartorius-sbi

Sartorius SBI Interface for NodeJS

Scales Supported

  • Sartorius PMA 7501
  • Sartorius PMA 7501-X
  • and others...

Usage

var Scale = require('sartorius-sbi').Scale;

var scale = new Scale({ ttyDevice: '/dev/ttyUSB0', baudRate: 9600 });

scale.on('connect', () => {
   scale.deviceInfo( (err,devInfo) => console.log(`scale: ${devInfo}`) ); // -> "scale: PMA7501-X00V1"
});

scale.on('weight', (err,measure) => {
    if (err) { return console.error(err); }
    console.log( 'weight: ' + measure.weight + + measure.uom ); // -> "weight: 0.0g"
});

scale.open( (err) => {
    if (err) { return console.error('Unable To Connect To Serial Port'); }
  
    // tell the scale to zero itself
    scale.tare( () => {
        scale.weight( (err,measure) => {
           if ( measure.uom === '/lb' ){
                  scale.toggle(); // switch to measuring grams
           }
           scale.monitor(); // emit 'weight' and 'keypress' events whenever the scale changes
        });
    }); 
});

Example applications

  • sbi-cmd command line interface for SBI scales.
  • sbi-httpd simple web interface for for SBI scales.

Documentation

Coming Soon...

Note:

We're back! Sartorius sent me a PMA Evolution! Expect new features soon...

Don't see the Sartorius Scale that you have? I am willing to add support for other Sartorius lab scales and balances. Contact me and I'll help you get it added to the supported devices list.

About

Sartorius SBI Interface for NodeJS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published