LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DIGITAL I/O SETTINGS

I have a NEW simpler stepper motor labview program in LV6.0 that is suppose to work. It is designed to move the stepper up and down. Why it does not work? I have attached the VI in LV6.0.
0 Kudos
Message 11 of 42
(1,169 Views)
You did not wire the Digital Channel to the DIO functions. The DIO does not know which set of 8 lines to work with. If you are using the first set of 8 lines, that would be Channel 0. Right click on the Digital Channel input and select Create Constant. Then inside the constant box, select channel 0.
- tbob

Inventor of the WORM Global
0 Kudos
Message 12 of 42
(1,160 Views)
I have modified the stepper.vi. Is it correct? Is the "wait" wired correctly?
0 Kudos
Message 13 of 42
(1,144 Views)
Sorry. The attachment is here. Is the "wait" in "motor down" wired correctly?
0 Kudos
Message 14 of 42
(1,143 Views)
The wiring looks correct. The wait times depends on how fast you want to step the motor. Try it out and see what happens.
- tbob

Inventor of the WORM Global
0 Kudos
Message 15 of 42
(1,140 Views)
I have attached a file. Can you explain why the WAIT is attached here in this SEQUENCE and no where else?
0 Kudos
Message 16 of 42
(1,132 Views)
I have attached a file regarding the 50 PINS on my 6025E DAQ card. WHich PINS shall I connect the FOUR wires from my stepper motor. The four wires are regarding STEP, DIRECTION, PRESET and CLOCK?
0 Kudos
Message 17 of 42
(1,133 Views)
Regarding why the wait is connected there, well actually it is not. Someone has done a poor job of wiring, a no-no in labview.
It appears the wire really goes to the sub vi above the wait function, for the wait function has no terminal there.

A double click on that wire to highlight it will show you how it is actually routed.

What that wire does for the sub vi is anybody's guess, the i block hold the number of the loop iteration.
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 18 of 42
(1,129 Views)
As pointed out before, the wire that you thought was going to the wait is actually going under the wait and into the DIO function. This wire is meant to signal the DIO to configure the port and then write to the port when i=0, and to just write (no configure) when i is not zero. There is no need to configure each time through the loop, the first time is enough. It is considered bad wiring to route a wire under another function.
As far as choosing lines, I like to start with DIO0(pin 25). I would choose DIO0 for CLOCK, simply because it is easy to change the first bit (LSB) for every clock cycle you want to send. You can choose any other comination you would like. Perhaps DIO1 for STEP, DIO2 for DIRECTION, and DIO3 for PRESET. I normally choose the line that is most likely to change as the lower bit and then go up from there. Just write down your choices. You would send 0000 for clock low, then 0001 for clock hi. To combine clock with others you could send something like 0010 for step with clock lo, then 0011 for step with clock hi. To change direction send 0110 then 0111. I am not familiar with your stepper motor so I just using these values as an example. When sending the values, it would be easier to display the value in binary (set show radix visible), then you could see which bits are high/low and you would know what functions they correspond to (clock, step, etc). You could also use a variable for the data with clock low, then just add 1 to the variable for data with the clock hi. For instance, you could define StepForward=6 (b0110) and StepBack=2 (b0010). Then to step forward you would send the variable StepForward to the DIO, then StepForward + 1 (b0111) for the clock. That way you don't have to mess with the values each time you want to send a command. Since the values are constant, it is OK to use local variables here. I hope this is clear to you.
- tbob

Inventor of the WORM Global
Message 19 of 42
(1,116 Views)
I have redone the stepper.Vi It still cannot RUN. Please help. The NEW stepper.vi is attached.
0 Kudos
Message 20 of 42
(1,077 Views)