Skip to content
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

I want to know how to use the 'values' to vue component's data #139

Open
ldj011210 opened this issue Jun 13, 2023 · 1 comment
Open

I want to know how to use the 'values' to vue component's data #139

ldj011210 opened this issue Jun 13, 2023 · 1 comment

Comments

@ldj011210
Copy link

ldj011210 commented Jun 13, 2023

function valuesReady(anythingBad, values) {
if (anythingBad) { console.log("SOMETHING WENT WRONG READING VALUES!!!!"); }
console.log(values);
doneReading = true;
if (doneWriting) { process.exit(); }
}
Where does this values come from, and how can I apply it to vue's components data()

@plcpeople
Copy link
Owner

values is the object created and returned by nodeS7 with the variable values from the PLC.

To get this into vue, you'd probably want to build a vue + NodeJS project, where NodeJS is the web server for the project. There are lots of examples if you google "vue node.js server example" and at least one of these should show how an object that exists on the server can work the way you're asking.

I will leave the issue open in case anyone else wants to submit a PR with an example or wants to comment more, but we don't use vue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants