How Can I Communicate With an Instrument Which Requires me to Write and Read from I/O and Memory Space in CVI?Primary Software: LabWindows/CVI Development Systems>>Full Development SystemPrimary Software Version: 6.0 Primary Software Fixed Version: N/A Secondary Software: N/A
Problem: I have multiple instruments that I want to communicate with. Some require me to read and write from either the I/O Space and some from the Memory Space of my computer. Is there a way to do this directly within CVI? Solution: CVI provides a host of functions which allow easy access to both the I/O and Memory Space of your computer. They are low-level functions and you should be careful in how you use them. I/O Space - To communicate in I/O space, use the inp and outp functions. To perform parallel port communication, you will want to use these functions. They do require that you know the exact address to read from and write to. Memory Space - To read and write to physical memory, use the ReadFromPhysicalMemory and WhiteToPhysicalMemory functions. Every time you use these functions, you map and unmap physical memory. To reduce this overhead, you can use the Map/UnMapPhysicalMemory functions to obtain pointers to portions of memory. This pointer can be treated like any other C pointer. Note: When using Windows NT, you must load a low-level support driver for these functions. Load this driver, cvintdrv.sys, when you install CVI on Windows NT. The driver is visible from the Devices Control Panel. To make sure the driver is loaded before you begin programming, use the CVILowLevelSupportDriverLoaded function. Related Links: Attachments:
Report Date: 11/13/2002 Last Updated: 12/05/2004 Document ID: 2RCK8PTL |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
