03-27-2008 05:33 PM
To Disable Warp Mode
viOut8
address space: 12
offset: x1F
value: x80
viOut8
address space: 12
offset: x1D
value: d67
To Enable Warp Mode
viOut8
address space: 12
offset: x1F
value: xC0
viOut8
address space: 12
offset: x1D
value: d53
Using the function:
viOut8(ViSession vi, ViUInt16 space, ViBusAddress offset, ViUInt8 val8)
In Matlab, my code is:
loadlibrary('visa32.dll','visa.h','alias','myvisa');
defaultRM = uint32(1);
instr = uint32(1);
ref = int8(['PXI5::0::INSTR' 0]);
[status defaultRM] = calllib('myvisa','viOpenDefaultRM',defaultRM);
[status ref instr] = calllib('myvisa','viOpen',defaultRM,ref,0,0,instr);
val = uint8(1);
[status val] = calllib('myvisa','viIn8',instr,12,31,val);
Which works fine and is able to read the value of the register at address 12 and offset 31 (x1F). However, if I try to write in the same way and then read it back, the write seems to have no effect:
status = calllib('myvisa','viOut8',instr,12,31,192);
[status val] = calllib('myvisa','viIn8',instr,12,31,val);
For both of these commands, status = 0 indicating the command completed successfully, but val is the original value, no matter what number is written with viOut8. Also, if I use the "VISA Interactive Control" program, I find the same behavior. I can read the same values, but if I try to write a value with viOut8, it has no effect.
Is there something I'm missing to be able to write to these registers?
Thanks,
Dave
03-28-2008
04:57 PM
- last edited on
06-20-2024
01:36 PM
by
Content Cleaner
Since you don't have LabVIEW I have compiled the VI available in that developer zone article into an executable. In order to run this VI you'll need to download and install the LabVIEW Run-Time Engine 8.5 (the full 98 Mb version). Try running this VI to set the card to warp mode. In the mean time I will try to track down a PCI-6251 and attempt the registry changes with the VISA Interactive Control to see if it works or not--I'll post back once I find out. Let me know what you find when you try this VI.
Have a great weekend!
03-28-2008 05:07 PM
03-28-2008 05:54 PM
03-28-2008 05:56 PM