LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DIGITAL I/O SETTINGS

As I said before:
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.
The Digital Channel input to the DIO function is the middle terminal on the left side.
- tbob

Inventor of the WORM Global
0 Kudos
Message 21 of 42
(960 Views)
Sorry I sent the wrong stepper.vi. I have now attached the RIGHT stepper.Vi. It still does not work. I have already attached a weighing machine to the SERIAL port. Should I change the I/O from 0 to 1?
0 Kudos
Message 22 of 42
(949 Views)
The only thing that I can see is that you initialize the port in both frames of your sequence. Sequence frame 0 has the i wired to the initialization terminal. So does sequence frame 1. What is happening is that the port gets initialized, then the first byte A is written to the port. Then in the next frame, the port gets initialized again, probably causing some strange data to go to the port, then the next byte B is written. You should try replacing the wire from i in frame 1 of both cases, Motor Up and Motor Down. Replace with a constant other than 0. You could wire an increment function (+1) in between the i and the initialization input. That way, frame 1 will never cause the port to be initialized again. If this doesn't work, then instead of using the high level Write to Digital Port, use the lower level DIO Config and DIO Write found in the same palette as Write to Digital Port. Call DIO Config, then DIO Write with the first byte, then DIO Write with the second byte. This is a better way to do it, especially since you are doing this in a loop many times. See the attached example at the Motor Down case.
- tbob

Inventor of the WORM Global
0 Kudos
Message 23 of 42
(945 Views)
Your LV is in 7.1. I am still using LV6.0. I hope you can convert the VI from 7.1 to 6.0. Thank you.
0 Kudos
Message 24 of 42
(941 Views)
Sorry, I don't have 6.0 installed. Here is a picture of the block diagram.
- tbob

Inventor of the WORM Global
0 Kudos
Message 25 of 42
(935 Views)
Thanks. Can you convert the VI to LV7.0? I have a 30 day trial LV7.0 installed.
0 Kudos
Message 26 of 42
(928 Views)
Here is the 7.0 version. I do not have a DIO board in my computer so I could not test. Also, your DIO board may have different drivers than what I have on my computer. You should start from scratch and use the DIO Config and DIO Write functions from your palette. Just use the attached vi as a visual model.
- tbob

Inventor of the WORM Global
0 Kudos
Message 27 of 42
(919 Views)
I have managed to get hold of part of a stepper.vi in LV6.0. However I have transfered part of it from the paper. This one uses TRUE/False. Why is this different from the earlier one.
0 Kudos
Message 28 of 42
(889 Views)
I have never worked with stepper motors but I assume that you send the motor driver some number and it steps the motor in some direction for a certain number of steps. Your attached vi seems to cause a different number being sent to the motor driver depending on the true/false condition. Probably, true means in one direction, and false in the other direction. Without knowing more about the motor driver, I would not know what values to send. You could use a boolean to choose the direction, and that boolean wired to a case structure would cause the correct value to be sent.
- tbob

Inventor of the WORM Global
0 Kudos
Message 29 of 42
(880 Views)
A friend of mine gave me the attached steppermotor.Vi in LV6.0. According to him , it works! However I have not been able to get it to work. Could you point out some of the mistakes. It is used to move TWO stepper motors. One stepper for up/down and the other left/right. It is in LV6.0 but I have open it in LV7.0. If I reopen in LV6.0 would there be errors?
0 Kudos
Message 30 of 42
(870 Views)