# :WAVeform:CGRade:XML:WRITe?

:WAVeform CGRade Commands

- :WAVeform:CGRade:ASCii:DATA?
- :WAVeform:CGRade:COLumns?
- :WAVeform:CGRade:INTeger:DATA?
- :WAVeform:CGRade:POINts?
- :WAVeform:CGRade:ROWS?
- :WAVeform:CGRade:STATus?
- :WAVeform:CGRade:STATus:REASon?
- :WAVeform:CGRade:UICount?
- :WAVeform:CGRade:WCOunt?
- :WAVeform:CGRade:XINCrement?
- :WAVeform:CGRade:XML:READ?
- :WAVeform:CGRade:XML:WRITe?
- :WAVeform:CGRade:XORigin?
- :WAVeform:CGRade:YINCrement?
- :WAVeform:CGRade:YORigin?

## Query Syntax

    :WAVeform:CGRade:XML:WRITe? CGMemory{1:8}, <XML_data>

## Query Response

    {1 | 0}

## Description

Writes color-grade gray-scale data that has been read from Infiniium 2026 using the `:WAVeform:CGRade:XML:READ?` query into one of Infiniium's eight color-grade gray-scale memories. This data is in the internal database format. This is the same data format used when saving waveform data to Infiniium's file system (.cgsi) using the `:DISK:EYE:SAVE` and "`:DISK:EYE:SAVE:FTYPe` `DATabase`" commands. The data consists of an ASCII XML header followed by binary waveform data. The waveform's vertical and horizontal scaling parameters are included. Be sure to include the comma to separate the waveform memory parameter from the <XML_data> parameter.

## Python Example

This script demonstrates Infiniium's `:WAVeform:CGRade:XML:READ?` and `:WAVeform:CGRade:XML:WRITe?` queries. Waveform database is:

1. Returned from Infiniium's Connection 1 Channel 1.
2. Written into Infiniium's color-grade gray-scale memory 2.
3. Saved to a color-grade gray-scale file (.cgsi) in the script folder.