LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

PXIe-5423 Channel Error

Solved!
Go to solution

Greetings:

 

I am using Labwindows CVI with a PXIe-1085 Chassis and a PXIe-5423 Card.

I recently installed the driver for the card and am attempting to generate a waveform.

I do not understand how the channels should be named ie "CHANNEL1", "CHANNEL2"...

I am getting a channel error.

 

Here is the code:

 

Code to create the waveform here.

ViReal64 arbWaveForm[32768];

 

for (int i = 0; i < 32768; i++)
{

.

.

.

{

 

ViStatus viStatus = 0;
ViSession ViSessionAWG = 0;

ViInt32 ViSessionAWG_WaveformHandle = 0;

ViChar ChannelName1[64] = "";
ViChar ChannelName2[64] = "";

 

//Initializes and checks the state of the drvioer to be sure its the correct instrument driver for the instrument.
//Resets the PXIe-5423 40MHz 16Bit AWG
viStatus = IviFgen_init("ni5423 (2CH)",VI_TRUE,VI_TRUE, &ViSessionAWG);

 

//Gets the PXIe-5423 40MHz 16Bit AWG Channel Name.
viStatus = IviFgen_GetChannelName(ViSessionAWG, 1, 64, ChannelName1);
viStatus = IviFgen_GetChannelName(ViSessionAWG, 2, 64, ChannelName2);

 

//Sets the PXIe-5423 40MHz 16Bit AWG for an Aribtrary Waveform Output.
//Also could use IVIFGEN_VAL_OUTPUT_SEQ
viStatus = IviFgen_ConfigureOutputMode(ViSessionAWG, IVIFGEN_VAL_OUTPUT_ARB);

 

Crashes here due to unknown Channel?

//Creates the PXIe-5423 40MHz 16Bit AWG for an Aribtrary Waveform Output Waveform.
viStatus = IviFgen_CreateChannelArbWaveform(ViSessionAWG, "CHANNEL1", 32768, arbWaveForm, &ViSessionAWG_WaveformHandle);

 

Any ideas on what I am doing wrong?

Thanks.

0 Kudos
Message 1 of 2
(954 Views)
Solution
Accepted by topic author codehawk

I tried the niFgen functions instead and now do not have the channel errors anymore.

0 Kudos
Message 2 of 2
(926 Views)