Hello, I have to make a program to control a stepper motor in LabVIEW. I am using LabVIEW ver.11 and I have a diagram written in LabVIEW ver.5 (I believe), but I can't find (recognize) all the functions there. Can someone point them out to me, please. I will upload a screenshot of the diagrams : labview 5 http://desmond.imageshack.us/Himg6/scaled.php?server=6&filename=diagramu.jpg&res=landing and this is what I have : labview mine http://desmond.imageshack.us/Himg710/scaled.php?server=710&filename=diagram2.jpg&res=landing
2 Answers
The thing on the left is an array, you have an array constant without a datatype in it. It seems to be simply hex constants - just drag and drop them and fill them with the data you need (basically the tables for the stepper motor modes).
I can't quite recognize the next one, the image is too blurry, but if there is I8 on it, it's an indicator, of data type I8. The TF thing is the old look of a boolean array output. You have converted that AA or whatever (depending on the mode/look at those tables) to a boolean array, which is the data you feed to your motor.
The pink zero is a string constant with zero in it. From the context, I'd say you use it for either accessing the 0th channel or the 0th measurement card. DigPort is probably a very old way of DAQ-communication, but I'm not so sure, it's been a few years. Do you use some measurement card by NI? If so, you need to look for DAqmx now.. You also seem to be missing a 8 with the first modulo.. And that modulo 10 code seems to be some pointless decoration.
Anyways, I urge you to do this differently and actually try to understand what kind of data you are sending to the port/your card/whatever your mode of output is. The old code looks as if it could work, but it's not how you write a clear, readable piece of modern LV code. If you are using NI hardware, just google DAQmx in conjunction with stepper motor.

- 396
- 2
- 6
The old code moves a stepper motor by setting the single phases. This is done by outputting a mask of bits through Dig port VI on every iteration . Those bits are expressed as hex number by the blue array: I suppose it has 8 items because it is accessed modulo 8.
This in turn means two things:
- the content of the array is fundamental and need to be changed if the hardware has been modified;
- you should use the proper VI instead of Dig port if you changed the way digital outputs are handled (or have access to the old Dig port VI if nothing changed).
The other things you marked are debugging soup.
A cleaner way, with "code" and description, to handle a stepper motor can be found here:

- 7,372
- 1
- 27
- 44