12-21-2023 02:18 PM
12-21-2023 02:45 PM - edited 12-21-2023 02:46 PM
sampling period; (control) is points/period?
What is this block?
Can this block be replaced with something like +, -, x or something else?
In the second if loop, what is in the 2nd position of Positive? Can you give me a screenshot?
12-21-2023 03:17 PM - edited 12-21-2023 03:23 PM
I would probably use significantly less code:
Yes, you need to think about edge effects. For example since the max and zero should not duplicate, you need to decide how to treat things. Tweak as needed.
Note that you must make an effort to understand every subtlety of the code (e.g. the concatenating tunnel and the special mode for "built array", etc.) and be able to explain it to the teacher. The teacher reads this forum too!
12-21-2023 03:20 PM
mihairusu11@yahoo.com wrote:
What is this block?
The picture is actually a LabVIEW snippet, so just download it and then drop it onto your diagram and all code will be there! (see also here for details)
12-21-2023 03:32 PM
@altenbach wrote:
Yes, you need to think about edge effects. For example since the max and zero should not duplicate, you need to decide how to treat things. Tweak as needed.
If you want to terminate the train with the first point, here's how you could modify the code (this is NOT a snippet!)
12-28-2023 04:26 PM - edited 12-28-2023 04:27 PM
I want the scheme to be as simple as possible, as is the scheme above but without the block with "i" and "rq".That is, it should be with the most fundamental things, more mathematical calculations, based on formulas.
12-29-2023 11:03 AM
Can you give me both situations in the second case and tell me if there is any situation in the first case?
12-30-2023 02:03 AM
mihairusu11@yahoo.com wrote:
I want the scheme to be as simple as possible, as is the scheme above but without the block with "i" and "rq".That is, it should be with the most fundamental things, more mathematical calculations, based on formulas.
You probably mean "r" and "iq", a simple quotient and remainder function. A fundamental function.
As has been said already, the picture is a snippet, so you can just drop it on the diagram and it will turn into functional code where you can look at the other cases.
Have you looked at my earlier example. It is very simple!