LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to generate 3 bit digital signal using

Solved!
Go to solution

 

Hi,

      I am trying to generat 3 bit digital signal using 9403 digital module and cRIO 9014.I have to generate all the combinations from 000 to 111.So i have to give boolean constant either true or false to output module 9403.I am not gettimg how to incrase step value from 000 to 001 and so on..Should i use shift register??

I know how to use shift register for integer value bt i dont hv any idae about boolean value.

     hoping for solution....

0 Kudos
Message 1 of 5
(2,376 Views)

Try this simple example.

 

0 Kudos
Message 2 of 5
(2,371 Views)

 

                  Thank u.

                        But is it neccessary to use DAQmx ?? Is it possiple without DAQmx??becoz i hv to use digital output module in FPGA  VI...

                  And have to use generated signal in HOST VI...

0 Kudos
Message 3 of 5
(2,361 Views)

Yes you can do this with FPGA.  You might not need to use a shift register at all.

 

EDIT - You can use shift registers to store any data type if needs be

 

- Do you want the values to change at a given period or from a user input?

- After you ramp 0-7; do you want to stop generating, continue or set a safe state (0,0,0)?

 

Dennis' example is taking advantage of the fact that a number is binary.  So in the U8 - 0 is 000, 1 is 001 and so on.  As you only have 8 variables you could initialise a boolean array of all of the combinations, or you could convert the numeric to its binary equivalent to write to the 3 FPGA outputs.

 

For cRIO applications the CompactRIO Developers Guide shows how to communicate between Host - RT - FPGA.  You should get some more ideas from there Smiley Happy


Regards,

Peter D

0 Kudos
Message 4 of 5
(2,353 Views)
Solution
Accepted by amruta1

Here is a little example which uses the Number to Boolean Array function.  The Numeric indicator has it's display formatting set to binary (%b).

 

BD - Numeric Boolean Comparision.png

 

FP - Numeric Boolean Comparision.png


Regards,

Peter D

0 Kudos
Message 5 of 5
(2,349 Views)