Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

question about visa and parallel port

Hi, everyboby!!!!!
I cheked a few examples about sending(output) data to the paralell port using visa, in one of this examples
appears a boolean array (i think!! ) with something that looks  like a pattern that will be sent to the parallel port pins.
My question is the following: if i use VISA .vi, and just need to use 6 pins from the parallel port (let's say from D0 to D5) what should i do in order to send  specific patterns (000001, 111111, for example) to the port....can i do that with VISA?  Since i want to generate and output a 6- bit code that will be the input of a D/A converter. I'm using windows 2000.........Any suggestions?
Thanx in advance !!!Smiley Happy

 
0 Kudos
Message 1 of 4
(4,031 Views)
I'm not sure what the issue is. If you only want to send 6 bits worth of data, you limit the data sent to either an array with 6 elements or limit the number sent to be between 0 and 63. There is no difference between 00111111 and 111111. It's the same number.
0 Kudos
Message 2 of 4
(4,019 Views)
ok, thanks for taking  the time for reading this....
I have a D/A converter, i decided to use  6 bits. The thing is that i should be able to generate the different combinations (2^6) using the parallel port. In my front panel i must be able to CHOOSE what combination should be generated  as output by the parallel port.

Let's say, i build a boolean array like this 011111,so using VISA.vi , i would expect to  get as output in the parallel port  0v,5v,5v,5v,5v,5v. My D/A converter will decode this binary code. Keep in mind that  with everyone of the 2^64 combinations there will be  an action associated in my project   .

First , i choose the combination in my front panel,  then it appears  as output voltage levels in the parallel port, and finally these voltage levels will become the inputs of my D/A converter .

I read that the most significant digit  appears in the  D9 pin ....since i am using just 6 bits
 that means that i only have to wire pins from D9 to D4  to the  D/A converter  ?....
I am not sure if i can do all this using VISA. vi..... but using VISA . vi  seems to be much  easier!!!

please any suggestions, recommendations, etc. will be taken in account!!!!

THANX!!!!!
0 Kudos
Message 3 of 4
(4,011 Views)

No, you do not wire pins 4 through 9. You wire pins 2 through 7 (D0 to D5). I think what is confusing you is the order of a Boolean array. If you look at an array control, the least significant bit in the array is the element closest to the index display control. So for an array that is arranged horizontaly, it is the left-most element. For a vertical arrangement, it is the top-most. Here is an example in LabVIEW 8 that hopefully will make things more clear. An array or a numeric can be used to control the output.

In LabVIEW 8.x, you also have a shipping example that shows how to read/write to the parallel port. The difference is that the shipping example uses the Inport/Outport functions.

0 Kudos
Message 4 of 4
(3,997 Views)