Bonsoir,
Je voudrais envoyer sur un générateur de fonctions une onde prédéfinie (d'une variable ou d'un fichier)
pour communiquer avec l'appareil (DG4000), j'utilise l'interface Visa TCP-IP
par exemple, la commande suivante envoie les valeurs : 1,10,100,200,400
fprintf(DG4000,':DATA:DAC VOLATILE,1,10,100,200,400')
Si je veux envoyer 1000 ou 2000 valeurs.... cette façon de procédé ne peut pas fonctionner.
Comment je peux faire pour envoyer toutes les données d'une variable tableau ou d'un fichier ?
Merci
Ci-dessous la syntaxe des deux commandes.
Syntax
[:TRACe]:DATA:DAC VOLATILE,[<binary_block_data>|<value>,<value>,<value>...]
Description
Download binary data block or decimal DAC value to the volatile memory.
Explanation
<binary_block_data> is the binary data to be downloaded. The range is from 0000 to 3FFF and the data length is 4 Bytes (2 pts) to 32768 Bytes (16 kpts). The binary data block starts with #.
For example, send :DATA:DAC VOLATILE,#516384binary data
The number 5 following # represents that the data length information 16384 holds 5 characters and 16384 represents the number of bytes of the binary data. As each waveform point holds two bytes, the number of bytes must be an even number.
<value>,<value>,<value>...: represent the decimal DAC to be downloaded. When the data does not start with #, the decimal DAC value can be sent in character string format.
For example, send :DATA:DAC VOLATILE,0,16883,8192,0,16383
5 data points are sent totally.
For data with less than 16384 points, the instrument will extend the data to 16384 points using uniform interpolation automatically.
After this command is sent, the instrument will switch the current channel to output volatile waveform automatically and modify the interpolation mode and the number of editable points. The data downloaded using this command can be edited on the instrument.[:TRACe]:DATA:DAC16
Syntax
[:TRACe]:DATA:DAC16 VOLATILE,<flag>,<binary_block_data>
Description
Download the waveform edited into the DDRII.
Explanation
This command consists of two parts. The first part is the command character string ([:TRACe]:DATA:DAC16 VOLATILE,<flag>,) and the second part is the binary data (<binary_block_data>).
<flag> represents the data transmission state and can be set to "CON" or "END". "CON": there are still data packets after the current one; "END": this is the last data packet and the data transmission is finished.
<binary_block_data> is the binary data to be downloaded and the range is from 0000 to 3FFF. The data length must be 16 kpts (32 kBytes).
The binary data block starts with #.
For example, send :DATA:DAC16 VOLATILE,CON,#532768binary data
The number 5 following # represents that the data length information 32768 holds 5 characters and 32768 represents the number of bytes of the binary data. As each waveform point holds two bytes, the number of bytes must be an even number.
When the <flag> in the command received is END, the instrument will automatically switch to arbitrary waveform output.
If the total length of the waveform to be downloaded is 16 kpts and the waveform is downloaded into the instrument in one operation, users can edit the data on the instrument. Otherwise, local editing is not supported.
Partager