# LabVIEW

cancel
Showing results for
Did you mean:

Highlighted

## Iteratively counting up from 0 to 4 and counting 4 to 0

Please, enlighten me how I can iteratively count up from 0 to 4 and count down from 4 to 0 with 0.1 sec delay.

Message 1 of 17
(303 Views)
Highlighted

## Re: Iteratively counting up from 0 to 4 and counting 4 to 0

Repeatedly doing something implies a loop.

Delay implies wait function.

Keeping track of a number implies a shift register.

Keeping track of counting up and down also implies a shift register.

Knowing when to changing from counting up to down implies a comparison function.

Message 2 of 17
(287 Views)
Highlighted

## Re: Iteratively counting up from 0 to 4 and counting 4 to 0

Thank you for the nice captioning.

Could you please, share the circuit. I am completely new with LabView.

Message 3 of 17
(281 Views)
Highlighted

## Re: Iteratively counting up from 0 to 4 and counting 4 to 0

It sounds like you are learning, and probably taking a class.  We don't do homework for people.

But if you read what I said, I told you all the parts you will need.  (I don't think I missed anything.)  So a programmer should be able to logically think this through and put the pieces together.

By the way, it is not a "circuit".  A circuit is something electricity flows through.

What you mean is the block diagram, which while it does have "wires" connecting the blocks, it is a visual representation of the dataflow and logic.

Message 4 of 17
(272 Views)
Highlighted

## Re: Iteratively counting up from 0 to 4 and counting 4 to 0

I do thank you for the suggestions. Also thanks a lot for kind guidance.

I am not a student, neither taking a class. I know the differences that you have mentioned. The point is I suddenly found myself in the Labview for a short period of time. Until tomorrow I have to integrate something utilizing this counting.

Therefore, my request is either show me the program or give me the link that can be helpful exactly with this matter. Unfortunately, I have not got much time.

Message 5 of 17
(254 Views)
Highlighted

## Re: Iteratively counting up from 0 to 4 and counting 4 to 0

You definitely will want to take those tutorials.

Given a simple academic task will give you an idea, but not take you very far without learning more.  Without more training, I don't know what you expect to accomplish in "a short period of time".

But here it is.

Message 6 of 17
(235 Views)
Highlighted

## Re: Iteratively counting up from 0 to 4 and counting 4 to 0

The point is you are absolutely right. The code you shared will be also a material that I will learn. Likewise, I will try to change it as it would go to 0 after reaching 4 and then start counting until 4 again.

I do thank you  a lot! Appreciated!

Kudos to you.

Message 7 of 17
(228 Views)
Highlighted

## Re: Iteratively counting up from 0 to 4 and counting 4 to 0

There are so many ways to do this...

This is completely different solution. Both solutions wouldn't last long as the basis of a non-trivial application.

Without knowing how it will be used I fear that any suggestion will do more harm than good.

Message 8 of 17
(189 Views)
Highlighted

## Re: Iteratively counting up from 0 to 4 and counting 4 to 0

The point is I need to develop a GUI inside the big project which developed by couple of other engineers. The aim of the GUI would be to ask new values of parameters from the user and change the global data. In order to achieve that first I need to develop a fake environment that imitates the real hardware. Thus, the environment will need to read a data from excel file and imitate 4 different phases that iteratively changes from 0 to 4 (then 0 to 4 again) with 0.1 ms delay. If I will be able to create that fake real world emulator then I would aim for GUI itself.

Message 9 of 17
(181 Views)
Highlighted

## Re: Iteratively counting up from 0 to 4 and counting 4 to 0

@Armagedon wrote:

The point is I need to develop a GUI inside the big project which developed by couple of other engineers. The aim of the GUI would be to ask new values of parameters from the user and change the global data. In order to achieve that first I need to develop a fake environment that imitates the real hardware. Thus, the environment will need to read a data from excel file and imitate 4 different phases that iteratively changes from 0 to 4 (then 0 to 4 again) with 0.1 ms delay. If I will be able to create that fake real world emulator then I would aim for GUI itself.

So your counter must fit the profile of a driver. That could be anything. A OO solution would be completely different compared to an actor based solution (that can be OO)

Message 10 of 17
(174 Views)