Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Agilent 33220 Arb Waveform remote control issue- Error -220, Data out of range

Hello,

 

I am controlling one Agilent 33220A through one CVI application using the USB port, thanks to the API :

Ag33220_InitWithOptions, Ag33220_ArbitraryWaveformSetData,Ag33220_SystemWaitForOperationComplete...

I am performing a loop where my waveform is changing. THis waveform is sent in the volatile memory of the device.

This wavefom as 2000 points.

 

What i observe is that it works for 4 iterations, then an error -222 Data out of range happens when i try to set the waveform with 

Ag33220_ArbitraryWaveformSetData(session, WAVEFORM_SIZE, fWaveform, &iActual)

 

 

It is as if the Volatile buffer size has reach the end. But impossible to clean it or raz it in order that i can update a new waveform.

IS there any proper way to do this?

 

Thank you

Regards

 

 

LOOP 

GenerateDampedSinus ( fWaveform) ;


status = Ag33220_reset(session); //Reset the function generator
// Download data points to volatile memory
Check(session, Ag33220_ArbitraryWaveformSetData(session, WAVEFORM_SIZE, fWaveform, &iActual));
Check(session,Ag33220_SystemWaitForOperationComplete(session, 80000)); 

Check(session,Ag33220_ArbitraryWaveformCopyData(session, "VOLATILE")); // Copy arb to non-volatile memory
Check(session,Ag33220_SetAttributeViString(session, "", AG33220_ATTR_ARBITRARYWAVEFORM_USER, "VOLATILE")); 

Check(session,Ag33220_SetAttributeViInt32(session, "", AG33220_ATTR_OUTPUT_FUNCTION, AG33220_VAL_OUTPUT_FUNCTION_USER)); 
Check(session,Ag33220_SetAttributeViReal64(session, "", AG33220_ATTR_OUTPUT_FREQUENCY,PATTERN_FREQUENCY_HZ)); 
Check(session,Ag33220_SetAttributeViReal64(session, "", AG33220_ATTR_OUTPUT_VOLTAGE_AMPLITUDE,Signal_type.Amplitude_v)); 
Check(session,Ag33220_SetAttributeViReal64(session, "",AG33220_ATTR_OUTPUT_VOLTAGE_OFFSET,Signal_type.DcOffset));

Check(session,Ag33220_SetAttributeViBoolean (session, "", AG33220_ATTR_BURST_STATE, VI_TRUE)); // Turn sweep on
Check(session,Ag33220_ConfigureTriggerSource (session, "",AG33220_VAL_EXTERNAL));
// Check(session,Ag33220_SetAttributeViBoolean (session, "",AG33220_ATTR_OUTPUTTRIGGER_STATE,VI_TRUE));
// Check(session,Ag33220_SetAttributeViBoolean (session, "",AG33220_ATTR_OUTPUTTRIGGER_SLOPE/*AG33220_ATTR_OUTPUTTRIGGER_STATE*/ ,VI_TRUE));
Check(session,Ag33220_SetAttributeViInt32 (session, "", AG33220_ATTR_OUTPUTTRIGGER_SLOPE ,AG33220_VAL_TRIGGER_SLOPE_NEGATIVE));

Check(session,Ag33220_StateStorageSave(session, 1)); // Store state in memory location 4
Check(session,Ag33220_StateStorageRecall(session, 1));

Check(session,Ag33220_SetAttributeViBoolean(session, "", AG33220_ATTR_OUTPUT_STATE, VI_TRUE)); // Enable output, s
Check(session, Ag33220_StateStorageDelete ( session, 1));

 

END LOOP

0 Kudos
Message 1 of 2
(2,848 Views)

Hello,

 

- This error message comes from the instrument. 

Like the message says, do you check the range accepted by the instrument ?

 

- Or someone on the forum resolved the same issue by changing the regional settings : 

http://forums.ni.com/ni/board/crawl_message?board.id=170&message.id=928038

 

Best Regards

 

Eloise
NI France

0 Kudos
Message 2 of 2
(2,791 Views)