02-21-2007 01:08 AM
Hi,
I want to use the outport vi to write onto the data register of the parallel port.I am using Labview 6.1 on Windows XP platform.It gave me the following error:
"Capability not supported .VI was stopped at code interference node 0x1BC of subvi outport.vi”
What does this mean?
Also when I used the inport vi to read from the parallel port it gave the following error:
"Capability not supported .VI was stopped at code interference node 0x1D8 of sub vi inport.vi"
Also while executing these vi’s I did not connect anything at the port.Is it necessary?
Should I write something in the control register first before I perfom these operations?
Please help at the earliest.Thank you.
02-21-2007 08:14 AM
02-23-2007 07:44 PM
Hi,
Thanks for the quick reply.I downloaded the hwaccess library you suggested and I also got the new inport and outport VIs.I just ran a simple program to output a binary value say 5Ehex at the parallel port data register.The program runs without showing me any errors (thanks to you!) but when i measured the voltage at the data pins it was FFhex.The next time I ran the program to output the value 00hex it just showed me 00hex at the output.When I ran the VI subsequently the value did not change from zero.I don't know why this is happening.
I also have another question....to read the data placed at the data pins do I have to output something at the control register first?I am using the parallel port in the ECP/EPP mode.
I had downloaded a VI to write to the parallel port from the NI website but it gave me a time out error.But i figured that it might me easier to use the inport and outport VIs as I know the register addresses.
Any help is appreciated.
02-23-2007 09:03 PM
02-23-2007 10:08 PM
Hi,
thankyou for all your help.I really hope someone else helps me out soon!
02-24-2007 10:11 AM
02-26-2007 07:16 AM
hi,
i wrote a simple program to write and read from the data reg of parallel port using the outport and inport vi's of the accesshw library.it runs without giving me any errors.but does not show be the value i have written either.i am attaching the program.let me know if you can find something wrong with the program.thanks!
02-27-2007 06:51 PM
Hi msrit,
I took a look at your code and it looks fine from what I can see. I did find some information about bidirectional parallel ports that may be affecting you -
With some models of parallel ports the data lines can be read the same way we read the control lines, by driving them to high logic so they will take on the value of an external signal. However, most parallel ports require that you set the direction bit for input. This is bit 5 in the Control register (base+2). If the port is capable of it, setting the direction bit high has the effect of making the lines tri-state so it can be driven externally. Sometimes it is also necessary to toggle bit 6 high or low. However, it should be noted that some manufacturers actually lock these bits so that software cannot change them. An example is shown below in Figure 7.
To test whether your data lines can be used for input, try the following:
If the reads DON'T match the writes, your port is probably bidirectional. Setting C5 disabled the data outputs and you're reading the open inputs of the data-port buffer.
If the reads DO match the writes, your port isn't bidirectional. The data outputs are still enabled, you're reading back what you wrote, and you won't be able to read external signals.
If it is possible to use your data lines for input, then you just need to set control register bit 5 high and read from the value of the data lines at the base address.
I hope this helps!