BNC 645 User Manual
Page 180

180
//modulation. The pulse may also be configured in time
//units (pulse width and deviation) rather than duty cycle
//if
preferred.
viPrintf(vi,"*RST\n");
viPrintf(vi,"OUTPut:LOAD 50\n");
//Set the load impedance to
// 50 Ohms (default)
viPrintf(vi,"FUNCtion:SHAPe
PULSe\n"); //Carrier waveshape is pulse
viPrintf(vi,"FREQuency
5000\n");
//Carrier frequency is 5 kHz
viPrintf(vi,"VOLTage:LOW
0\n");
//Set parameters to 5 V TTL
viPrintf(vi,"VOLTage:HIGH
5\n");
viPrintf(vi,"FUNCtion:PULSe:DCYCle
35\n");//Begin with 35% duty cycle
viPrintf(vi,"PWM:INTernal:FUNCtion TRIangle\n");//Modulating waveshape
//is
triangle
viPrintf(vi,"PWM:INTernal:FREQuency
2\n");//Modulation frequency is 2 Hz
viPrintf(vi,"PWM:DEViation:DCYCle 15\n"); //Modulation depth is 15%
viPrintf(vi,"PWM:SOURce
INTernal\n");
//Use internal signal for
//modulation
//If using an external signal for PWM, connect the signal to the
//rear-panel BNC and use the command PWM:SOURce EXTernal
viPrintf(vi,"PWM:STATe
ON\n");
//Turn PWM modulation on
viPrintf(vi,"OUTPut
ON\n");
//Turn on the instrument output
viClose
(vi);
viClose
(defaultRM);
}
Visual Basic
Learn how to create and use BERKELEY NUCLEONICS CORPORATION
IOUtils components, controls, data access, and more with the Visual
Basic sample applications. For an overview and installation details, see
Visual Basic: Explore the Samples.
Visual C++
In an MFC application, you can override BERKELEY NUCLEONICS
CORPORATION IOUtils interfaces in a class as well as provide additional
interfaces. The example in this article illustrates how to override an