-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
writeItems callback always receives false #26
Comments
The parameter passed by valueswritten is intended to be false if everything was successful with the write, and true if there was an error with any of the items. Is there an issue with writes not working at all after a disconnect/reconnect? What is the best way to duplicate this? |
The writes do not work at all after disconnect/reconnect. Here is some test code that duplicates the issue. var nodepccc = require('nodepccc'); conn.initiateConnection({port: 44818, host: '10.0.0.101', /routing: [0x01,0x02,0x01,0x00]/}, connected); function connected(err) {
// if (doneWriting) { process.exit(); }
} function valuesWritten(anythingBad) { // This is a very simple "tag lookup" callback function that would eventually be replaced with either a database findOne(), or a large array in memory. |
Well I am able to duplicate the issue on my test setup but have to leave it for now. I will investigate more as soon as I can. |
Any idea why the writeItems callback is always passed a false parameter?
This is after a connection is established and read/writes are successful. When controller is disconnected, writes continue to return complete with quality OK. After reconnect, reads begin working again but writes do not.
conn.writeItems(['STR0', 'INT0', 'STR1', 'STR2', 'INT3', 'INT4'],
['Setup Number', 2, 'Customer Name', 'Order Number', 211200, 500500 ],
valuesWritten);
valuesWritten is always passed false, no matter what. ???
The text was updated successfully, but these errors were encountered: