Skip to content

Can not seem to use Float read or write functionality #2

Closed
@gman8a

Description

@gman8a

code

const { Layers } = require('node-drivers');
const tcpLayer = new Layers.TCP({ host: '192.168.0.230', port: 44818 });
const eipLayer = new Layers.EIP(tcpLayer);
const cipPCCCLayer = new Layers.CIP.PCCC(eipLayer);
const pccc = new Layers.PCCC(cipPCCCLayer);

pccc.typedWrite('F8:1', 0, (err)=> { if (err)console.log(err);})
pccc.typedRead( 'F8:1', (err, value)=> {
if (err)
console.log(err);
else console.log(value);
})

return this
$ node test1.js
{ message: 'Invalid parameter or invalid data',
info:
PCCCPacket {
command: 79,
transaction: 1,
data: ,
status:
{ code: 240,
extended: [Object],
description: 'Remote: Error code in the EXT STS byte' } } }
2.2779507836064226e-41

Note:
F8:1 has a value 1.00000
F8:2 has a value 2.00000

Any help please ?
Thanks,
Gary


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions