LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Generate triangular signal with ramp signal.

Ramp.pngScreenshot 2023-12-21 151745.png

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
Message 11 of 18
(534 Views)

sampling period; (control) is points/period?
What is this block?
Can this block be replaced with something like +, -, x or something else?
mihairusu11yahoocom_0-1703191425293.png

In the second if loop, what is in the 2nd position of Positive? Can you give me a screenshot?

0 Kudos
Message 12 of 18
(526 Views)

I would probably use significantly less code:

 

altenbach_1-1703193087524.png

 

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!

0 Kudos
Message 13 of 18
(516 Views)

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)

 

0 Kudos
Message 14 of 18
(515 Views)

@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!)

 

altenbach_0-1703194249567.png

 

0 Kudos
Message 15 of 18
(509 Views)

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.

IMG_0889.png

0 Kudos
Message 16 of 18
(453 Views)

Can you give me both situations in the second case and tell me if there is any situation in the first case?

mihairusu11yahoocom_0-1703869388127.png

 

0 Kudos
Message 17 of 18
(436 Views)

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!

Message 18 of 18
(423 Views)