LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using the In port.vi and Out port.vi in LabVIEW access my the Cards(Home made)

Hi Everyone,
I have got the Cards (home made 8 bit and 16 bit ) plug in at slot ISA my PC (I am using the commands inport and outport (addressed with 318-31A Hex) in C language to access very good).This now,I want to use LabVIEW language to access data directly to Port at my the Cards. In LabVIEW, Can I access data to port using the In port.vi and Out port.vi located in the Advance?
My English is poor, you don't laugh when you read it.
Thank you a lot.
0 Kudos
Message 1 of 6
(4,013 Views)
Hi,
your theory is sound. That's what those .vi's are made for.
There is one proviso to that though. It depends on what operating system you're using. Windows NT / 2000 likes to protect the user from direct access to this kind of memory, so National Instruments has made some drop in replacements for this in the accesshw.zip file.
You can get that here, if it's appropriate.
http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/e6415e8a8376f63d86256c46007592e8?OpenDocument
http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3DEBD56A4E034080020E74861&p_node=DZ52058&p_submitted=&p_rank=&p_answer=&p_source=External



Thanks
Sacha Emery
National Instruments (UK)
// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 2 of 6
(4,012 Views)
SachaE wrote:

> Hi,
> your theory is sound. That's what those .vi's are made for.
> There is one proviso to that though. It depends on what operating
> system you're using. Windows NT / 2000 likes to protect the user from
> direct access to this kind of memory, so National Instruments has made
> some drop in replacements for this in the accesshw.zip file.
> You can get that here, if it's appropriate.
> http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/e6415e8a8376f63d86256c46007592e8?OpenDocument
> http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3DEBD56A4E034080020E74861&p_node=DZ52058&p_submitted=&p_rank=&p_answer=&p_source=External

Just one question: I read over and over again that you need accesshw.zip
for IO
access under Windows NT systems.

I thought that accesshw.zip was only necessary on NT style systems (NT,
2000, XP) with LabVIEW 6.1 and earlier, as LabVIEW 7.0 and later come
with an Inport and OutPort version which does work under NT systems out
of the box (and the application builder has an option to add an
installation of the "Port IO Support"together with the application
installer.

Is my W2K computer just working because I did maybe at some point
install accesshw.zip in the past (I don't remember doing that)?

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 3 of 6
(4,013 Views)
Hi,
yes you're correct, it's just you didn't put down which version of LabVIEW you were using, and I figured that if you were having problems, then you were probably using an older version. Guess that'll teach me to try and second guess things!!!
Just as a by the way, here's some more information which may prove useful in your setup :

LabVIEW 7.0 cannot use the built-in In/Out Port VIs with a 32-bit address. Instead, you will have to use the versions of these VIs found in previous versions of LabVIEW.

Alternatively, you may use the AccessHW solution if you wish to perform In Port and Out Port calls on an Operating System which does not directly support the use of the LabVIEW-native In Port and Out Port VIs, such as Windows 2000/XP. Y
ou may find AccessHW via the link below to Port and Memory Utilities for Windows.

Actually, the In Port and Out Port VIs are intended for 16-bit port I/O and not for writing to arbitrary addresses in memory. For this reason, writing to 32-bit addresses never should have been allowed. One possible work-around would be to use NI-VISA to perform register-level programming. NI-VISA gives you access to any PXI/PCI board, not only NI boards, and can be used to access the board's registers.

http://zone.ni.com/devzone/conceptd.nsf/webmain/ADF3152837E2B4A486256B5600642AC7?opendocument

Hope that helps
Thanks

Sacha Emery
National Instruments (UK)
// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 4 of 6
(4,012 Views)
SachaE wrote:

> LabVIEW 7.0 cannot use the built-in In/Out Port VIs with a 32-bit
> address. Instead, you will have to use the versions of these VIs found
> in previous versions of LabVIEW.

Are you talking about physical memory access here? If so that is
something entirely different. The Intel x86 architecture uses a separate
IO address range which is entirely separate from memory space.
And at least up to the first Pentium models it was definitely never
possible to address more than 16 bits for IO address space.

This of course has gotten a little more complicated nowadays with many
PCI boards being actually mapped into memory address space instead of IO
address space. So eventhough a PCI board is more like an IO device it
often is accessed in the memory space.

> Actually, the In Port and Out Port VIs are intended for 16-bit port
> I/O and not for writing to arbitrary addresses in memory. For this
> reason, writing to 32-bit addresses never should have been allowed.

I think the VIs to access physical memory addresses were different than
the ones to access IO addresses. And yes it is definitely not a good
idea to have an application poke into physical memory as it could
completely screw the system to the point where you couldn't start it
anymore. Also IO devices mapped into memory address space are almost
always typically plug and play devices, so their address is not really
fixed and you need to do quite some more work on OS level to enumerate
your hardware and find the resources used before trying to access it.

This is something not really suited to try to do in LabVIEW and
therefore should be at least implemented as DLL but in fact anything but
a device driver is a very bad kludge.

> One possible work-around would be to use NI-VISA to perform
> register-level programming. NI-VISA gives you access to any PXI/PCI
> board, not only NI boards, and can be used to access the board's
> registers.
>
> http://zone.ni.com/devzone/conceptd.nsf/webmain/ADF3152837E2B4A486256B5600642AC7?opendocument

Thanks for this. Didn't now this existed in NI-VISA. Will check it out.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 5 of 6
(4,013 Views)
Thank you for your reply. My PC is using OS Window98 and LabVIEW 6.0. My Card ISA Digiatl I/O(I am using the the commands Inport and Outport in language C or pascal to write very good) . Can you teach me how to write it? I would be really grateful you to help me very much.
Again, thank you very much.
0 Kudos
Message 6 of 6
(4,012 Views)