I have a test system with a VXI modules and I have been tasked to build another identical system except for replaceing the VXI modules with a PXI modules. My question is can I convert any of the controller software or do I need to rewrite it all?
Whether you need to rewrite your I/O code depends on a number of factors. First, are you using instrument drivers for your current VXI system, and do your PXI vendors provide instrument drivers? If the answer to both of these is yes, then you should have little code to rewrite because most instrument drivers for similar type instruments provide a very similar interface. For example, if both a VXI switch card and a PXI switch card provide an instrument driver, changing between them should be straightforward.
If you are not able to leverage existing instrument drivers, then you may need to do register level communication for your PXI cards. This should be familiar to you since you have done VXI. The NI-VISA API uses the same functions, just the resource string changes. If you used NI-VXI calls for your VXI system, then you will need to learn a new API. To use NI-VISA for PXI, just get your register description manual from the vendor and follow the instructions in this paper on our site: