07-18-2019 08:47 PM
Hi guys,
So I am having a little bit of difficulty passing my voltage output value to the VI (case structure) above. How can I pass data from the while loop below to the case structure on top?
07-19-2019 12:42 AM - edited 07-19-2019 12:44 AM
Hi Alex,
your thread title is quite misleading: there is no event structure visible in your image…
"Quick and dirty" answer 1: use a local variable.
"Quick and dirty" answer 2: put all code inside the while loop inside the upper case structure.
Better approach:
Create that VI again from scratch and implement a better code architecture! (Using something like state machines, producer-consumer-schemes, and the like…)
Btw. there are better ways to create screenshots. 😄
07-19-2019 02:51 AM
@GerdW wrote:
Btw. there are better ways to create screenshots. 😄
And as long as you're attaching an image, you might as well put it in the message:
Saves us a download, and gets you more answers...
07-19-2019 08:35 AM
wiebe@CARYA wrote:
@GerdW wrote:
Btw. there are better ways to create screenshots. 😄
And as long as you're attaching an image, you might as well put it in the message:
Saves us a download, and gets you more answers...
Yeah, including a lot of complaints! What I think GerdW would advise you to do is to create a "Snippet" (look at the Edit Menu when looking at the Block Diagram) -- this created a .PNG file of the selected Code and doesn't require a camera!
Even better than a Picture, of course, is the VI itself. With a VI, we can poke around, see all of the code (not just what "fits" in the picture), can see any Errors that might be flagged by LabVIEW, can inspect the values on the Front Panel, can actually run and test the code, etc.
Which would you prefer if I was asking you for help with a 300-line C++ program, a picture of (part of, or all of) the code, or the code itself? Attach your VI.
Bob Schor
07-19-2019 08:58 AM
I assumed there is a good reason to post a photograph (although I can't thing of any good ones myself).
07-19-2019 12:05 PM
Sorry, here is my VI. I need to pass the data from my PID code to my driver code.
07-19-2019 02:18 PM - edited 07-19-2019 02:23 PM