01-28-2010 09:43 PM
As part of development I am trying work with simulation drivers.
Inside MAX I have set "niScope" driver session to simulate with specific driver (I also tried simulating with nisScope and the result was similar)
Here is the set of instructions I call:
niScope_init("Scope", VI_TRUE, VI_FALSE, &instScope);
niScope_SetAttributeViBoolean(instScope, "", NISCOPE_ATTR_DDC_ENABLED, VI_TRUE);
niScope_SetAttributeViBoolean(instScope, "", NISCOPE_ATTR_DDC_FREQUENCY_TRANSLATION_ENABLED, VI_TRUE) ;
And NI SPY says:
> 3. niScope_SetAttributeViBoolean (0x00000001, "", NISCOPE_ATTR_DDC_FREQUENCY_TRANSLATION_ENABLED, VI_TRUE)
> Process ID: 0x00000520 Thread ID: 0x00000954
> Start Time: 19:56:43.495 Call Duration 00:00:00.047
> Status: 0xBFFA4A3B
here is the elaboration:
Measurements: Specified property is not supported by the device or is not applicable to the task.
Property: Frequency Translation Enabled
Channel Name: 0
Status Code: -200452
Now if I enter the string "Model:5142;BoardType:PXI" or "Model:5441;BoardType:PXI;MemorySize:268435456" into driver setup, to make sure the simulation is taking the right hardware, when I initiate acquisition here is the NI SPY result:
> 28. niScope_InitiateAcquisition (0x00000001)
> Process ID: 0x00000778 Thread ID: 0x00000EA8
> Start Time: 20:33:15.452 Call Duration 00:00:00.000
> Status: 0xBFFA408C
with elaboration:
More DDCs are enabled than exist in the device. Note that some devices have fewer DDCs than channels.
Device: __tp3
Status Code: -214233
What this error mean? according to the NI5142 spec it should have Quadrature DC as well as baseband decimation. What I want is to send one IF signal to CH0 and perform quadrature downconversion on the signalthen fetch interleaved complex values.
Please let me know what I am doing wrong. Is it possbile at all to simulate with specific driver? I really need this because I prefer implementing on my desktop before trying my code on our NI PXI-1042Q embedded system.
BTW, I noticed that if I want to change any other DDC related ATTR say NISCOPE_ATTR_DDC_CENTER_FREQUENCY I will get the same error.
Thanks
Solved! Go to Solution.
02-01-2010 10:38 AM
Are you using a simulated IVI session or did you just create a simulated device in MAX by right clicking devices and interfaces»Create New...»Simulated NI-DAQmx Device or Modular Instrument»High Speed Digitizers»PCI-5142.
I set this up using a simulated card with that method and was able to enable both DDC and Frequency Translation without issue in LabVIEW.
02-03-2010 11:06 AM
Thank you for your informative post! I was using simulated IVI session and was not aware that there is such thing as simulated device too.
However that did not solve the problem for me! Now the device name in the error message has changed but it still complains about lack of DDCs!
More DDCs are enabled than exist in the device. Note that some devices have few
er DDCs than channels.
Device: PXI1Slot2
Status Code: -214233
02-03-2010 01:18 PM
Ok now I think I have an idea what was happening 🙂
First, to use the simulated IVI session I had to enter "Model:5142;BoardType:PXI" in the "Driver Setup" section of the MAX
Second, I was passing null ("") as channel name in all the instructions for example for "NISCOPE_ATTR_DDC_ENABLED", althouth it did not complain about that line, later "niScope_InitiateAcquisition" gave me error. So I changed it to "0" and now it seems to be working. Both with simulated device and also simulated IVI session after adding model name and board type.
Thanks for the helpful forum 🙂