04-02-2022 08:54 PM
On the block diagram below, the only variable or control that needs to be changed is the control named "x" . The final answer always has to be 0.47xx . So whatever number I use for x, the final answer should always be 0.47xxxx
How do you solve it? I have been trying to explore other blocks like the PID blocks, but I don't know which one should be used. Any idea???? I have attached my block diagram.
Note: Only x should be changed.
04-02-2022 09:28 PM - edited 04-02-2022 09:28 PM
Sounds like homework. Hint: first write it out with pencil and paper and solve it with algebra. Then the code should be easy.
-Kevin P
04-03-2022 09:05 AM - edited 04-03-2022 09:17 AM
@GRCK5000 wrote:
On the block diagram below, the only variable or control that needs to be changed is the control named "x" . The final answer always has to be 0.47xx . So whatever number I use for x, the final answer should always be 0.47xxxx
How do you solve it? I have been trying to explore other blocks like the PID blocks, but I don't know which one should be used. Any idea???? I have attached my block diagram.
Note: Only x should be changed.
Remove all the math functions and wire the "=? 0.47" terminal to a block diagram constant of 0.47.
Format the display as %.2fxxxx
Anything else will get you nominated for the Rube-Goldburg thread.
Perhaps you miss explained the problem.
04-03-2022 11:13 AM - edited 04-03-2022 11:39 AM
@GRCK5000 wrote:
On the block diagram below, the only variable or control that needs to be changed is the control named "x" . The final answer always has to be 0.47xx . So whatever number I use for x, the final answer should always be 0.47xxxx
How do you solve it? I have been trying to explore other blocks like the PID blocks, but I don't know which one should be used. Any idea???? I have attached my block diagram.
You make no sense!
Your default value is x=0.095, so 0.047xx would be "0.0470.0950.095", i.e. not even a valid number.
What is the difference between "answer" (0.47xx) and "final answer" (0.47xxx)? (Is this a game show???)
Maybe you should take a step back and tell us what result you expect for x=0.095?
0.047095? 0.0470095? 0.047095095? Something else?
What is the valid range of x? Is x always positive and less than 1? Can x be negative?
What are the expected results for other x values (x=100, x=1, x=0, x=0.5, x=-1, x=NaN, x=-Inf, etc.)
What does all this have to do with PID? Please explain. What is the purpose and application where you need this.
Would that work (x is positive and less than 1):
04-03-2022 12:11 PM - edited 04-03-2022 12:12 PM
Hi GCRK,
@GRCK5000 wrote:
So whatever number I use for x, the final answer should always be 0.47xxxx
According to your requirement the solution could be as simple as this:

04-03-2022 12:40 PM - edited 04-03-2022 12:41 PM
What a dumb assignment...This is how they teach LabVIEW these days?
Anyway here's a a few ideas...
I will let you do the math, don't forget negative numbers...
04-03-2022 01:04 PM
@RTSLVU wrote:
What a dumb assignment...This is how they teach LabVIEW these days?
Anyway here's a a few ideas...
- IF X = .47 or X = 0 then Z = .47
- IF X > .47 Calculate how much greater and subtract that value from X
- IF X < .47 Calculate how much less and Add that value from X
I will let you do the math, don't forget negative numbers...
Which gets a Rube-Goldburg nomination by replacing x with a unity operand!
04-03-2022 02:21 PM
@JÞB wrote:
@RTSLVU wrote:
What a dumb assignment...This is how they teach LabVIEW these days?
Anyway here's a a few ideas...
- IF X = .47 or X = 0 then Z = .47
- IF X > .47 Calculate how much greater and subtract that value from X
- IF X < .47 Calculate how much less and Add that value from X
I will let you do the math, don't forget negative numbers...
Which gets a Rube-Goldburg nomination by replacing x with a unity operand!
Well the assignment is to basically build a Rube-Goldburg machine.
Might as well follow the instructions...
04-03-2022 02:39 PM - edited 04-03-2022 02:46 PM
See msg3 no Rube-Goldburg required. Pretty simple: if you want to output a constant value, output the value of a constant.
04-04-2022 03:52 AM - edited 04-04-2022 03:53 AM