I have a larger project divided into several script files that include each-other.
One file defines a bunch of `const` values (naming of IO pins), which the others use. However, if the script file with the values hasn't been run, then the other files get the values as `undefined`.
For me, it's not a problem to run the prerequisites. But the end-user (someone on the factory floor) doesn't need to know the implemetation details, they need to press "run" and get a pass/fail at the end.
So: can I somehow invoke the prerequisite included scripts from the final "main" script, or perform a "run all" (not preferred, as I would like to use the same prerequisites for different "main" scripts)?
Question
jostikas
Hi! Hoping someone has already solved this:
I have a larger project divided into several script files that include each-other.
One file defines a bunch of `const` values (naming of IO pins), which the others use. However, if the script file with the values hasn't been run, then the other files get the values as `undefined`.
For me, it's not a problem to run the prerequisites. But the end-user (someone on the factory floor) doesn't need to know the implemetation details, they need to press "run" and get a pass/fail at the end.
So: can I somehow invoke the prerequisite included scripts from the final "main" script, or perform a "run all" (not preferred, as I would like to use the same prerequisites for different "main" scripts)?
Recreate:
What I get:
In step 2: `undefined`. In step 4: `0`.
What I wish to get:
In step 2: `0`.
Include problem.dwf3work
Edited by jostikasneed -> wish
Link to comment
Share on other sites
7 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now