10-25-2014 01:44 PM - edited 10-25-2014 02:05 PM
I need to generate 4 digital signals.
I have created a binary number which represents the 4 signals. (I'm not sure if I implented it correctly).
Questions:
1. How can I represent the binary number(4 signals) in a digital graph?
2. Is this the correct way of generating digital signals?
I need something similar to this:
Solved! Go to Solution.
10-25-2014 05:02 PM
Your code makes no sense.
Try something like the attached to rotate the bits...
10-25-2014 06:26 PM
Thank you for your time Alten. I should have written that this is my very first code with LabView. The code you posted inspired me alot.
I still need your help. Do you think that it might be possible to split this binary into four seperate digits? I'd like to draw a graph for each of the digits.
10-25-2014 06:34 PM
You can use "number to boolean array" to create an array of booleans, each element representing a bit.
Since you only get one value/iteration, you need to build an array of data (e.g. in a shift register) to be able to display it in a graph.
10-25-2014 06:56 PM
jangeer --
I'm guessing you might be trying to send the digital signals to a unipolar stepper motor driver? If so, using software timing will probably not be adequate for even moderate rotational speeds. Steppers tend to stall if there's timing jitter on their control signals. If my guessing is correct, and you have trouble with higher speeds, you'll probably need hardward timed digital outputs.
This is considered "software timed" because the timing of the DAQ is dependent on the iteration rate of the while loop and that is dependent to some degree on Windows juggling processes and priorities. If, for instance, Windows decides to go check if there's any new printers installed, the loop you're interating might be delayed a few microseconds more than all the others and the stepper will "see" this as frequency (speed) jitter.
"Hardware timed" signals have their own hardware clock that does not depend on Windows,etc. and is therefore much more stable and suitable for stepper control.