LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital signal graph using binary numbers.

Solved!
Go to solution

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:

Capture.PNG

 

 

 

0 Kudos
Message 1 of 5
(5,492 Views)
Solution
Accepted by aan928

Your code makes no sense.

 

  • Why are you building an array with one element is there is always only one element?
  • Why are you doing floating point operations whren dealing with integers?
  • Your VI does not have a digital signal graph.

 

Try something like the attached to rotate the bits...

Message 2 of 5
(5,444 Views)

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. 

 

  1. There is an array there because the data is going to a DAQ Assistant to generate an output port signal. 
  2. I had not idea that different net/var colors mean different types. 

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. 

 

0 Kudos
Message 3 of 5
(5,429 Views)

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.

0 Kudos
Message 4 of 5
(5,425 Views)

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.

0 Kudos
Message 5 of 5
(5,414 Views)