PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Editing PXI Memory

I am trying to read/write VI_PXI_BAR0_SPACE of PXI device using with VISA library.

Reading is easy but I am not able to write.

Is anyone able to write PXI memory?

 

Here is example code:

 

ViStatus res;
ViSession defaultRM, vi;
ViUInt32 oldData, newData;


viOpenDefaultRM(&defaultRM);
viOpen(defaultRM, "PXI0::CHASSIS1::SLOT3::FUNC0::INSTR",VI_NULL,VI_NULL, &vi);


//READ DATA
ViAddr addr = 0x8000;
viIn32(vi, VI_PXI_BAR0_SPACE, adr, &oldData);
printf("Addr: %04x Data:%08x\n", adr, data);

//WRITE DATA
newData = 0x7FF7;
res = viOut32(vi, VI_PXI_BAR0_SPACE, adr, newData);

0 Kudos
Message 1 of 1
(1,011 Views)