LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

writing bits!!!

Hi!
I have to shift 20 bits through DIO. Each 4 bits select one line of Appropriate IC (Multiplexer). Total 5 lC, connected together so each 4 lines makes truth table and select one line at a time of MUX.
e.g. If I have to select INP0 line of MUX1 that I will have to shift 20 bits and make pattern of 1000 0000 0000 0000 0000 so it wil select MUX 1 and Line 0 (INP0). If, I have to select INP9 lines than pattern should be 0000 1010 0000 0000 0000.
4 bits select 7 lines of each IC (Meance INP0 to INP7) like that.
please any body has idea, how to  send bit pattern than let me know.
Thanks
0 Kudos
Message 1 of 5
(3,253 Views)
Swami1,

I hope you are doing well today! You will need to have a little bit of logic in your application to achieve your solution. I have a included an image to help you create a number into a string with leading zeros and without leading zeros. All you need to do is to create logic to concatenate leading and trailing zeros (by using the Concantenate Strings function in the block diagram) to your string and you will have a solution. I hope this helps; please post back if you have any more questions. Have a great day!
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
Download All
0 Kudos
Message 2 of 5
(3,205 Views)
hi! Adnan,
thanks for your reply.
My question is how to generate bit patterns automatically or with lookup table to get select each channel at a time after finishing one cycle.
E.g. for first cycle select INP0 after shifting 20 bits at a time other channels are off and bit pattern should be 1000 0000 0000 0000 0000.
second cycle select INP1 - bit pattern should be 1001 0000 0000 0000 0000.
.................................
at last cycle select INP19 - bit pattern should be 0000 0000 0000 0000 1111 meance 5 no.s mux and channel no.7 of that mux.
 
thanks
 
0 Kudos
Message 3 of 5
(3,186 Views)

I am not following what you need swami1 !

Could you post some picture that would illustrate your request?

Trying to help but I don't know how,

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 5
(3,170 Views)
Swami1,

I am having some difficulty in understanding your question. Like Ben suggested, can you please post a table which explains what value each input needs to be converted to? Its really hard to understand your pattern right now. Have a great day!

Message Edited by Adnan Z on 12-22-2006 03:09 PM

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 5 of 5
(3,164 Views)