Adding More Channels in WaveForms
Let’s assume you have anAnalog Discovery 2and love it, but your setup needs more than two oscilloscope channels and themore powerful ADP3450with FOUR oscilloscope channels would be a bit overkill, like driving a rocket ship to the grocery store. Wouldn’t it be great if a single instance of WaveForms could manage multiple devices to result in the equivalent of a multi-channel scope/generator? Luckily, the advanced triggering options in WaveForms will let you synchronize multiple Digilent Test and Measurement devices so that they can capture, or provide, data simultaneously. Learn more by visiting the discussion on theDigilent Forum.
Using the Script Editor
- Slave application/device saves the data to a file

{varf=File("1.bin")f.writeDouble(Scope.Channel1.alldata)}{varf=File("2.bin")f.writeDouble(Scope.Channel2.alldata)}
- Master application/device loads the data to ref1/ref2
{// update time information, restore offset/rangevarr=Scope.Ref1.Range.valuevaro=Scope.Ref1.Offset.valueScope.Ref1.Clone(Scope.Channel1)Scope.Ref1.Range.value=rScope.Ref1.Offset.value=ovarf=File("1.bin")// we might have to wait for the other process to save the datafor(vari=0;i<1000&&!f.exist();i++);// read data and set it to reference channelvarrg=f.readDouble()f.deleteFile()Scope.Ref1.data=rg}{varr=Scope.Ref2.Range.valuevaro=Scope.Ref2.Offset.valueScope.Ref2.Clone(Scope.Channel2)Scope.Ref2.Range.value=rScope.Ref2.Offset.value=ovarf=File("2.bin")for(vari=0;i<1000&&!f.exist();i++);varrg=f.readDouble()f.deleteFile()Scope.Ref2.data=rg}
*Important note*For each instance of the time base or position changing, the Ref channel needs to be updated. You can accomplish this by using the Clone function (below):
// update time information, restore offset/rangevarr=Scope.Ref1.Range.valuevaro=Scope.Ref1.Offset.valueScope.Ref1.Clone(Scope.Channel1)Scope.Ref1.Range.value=rScope.Ref1.Offset.value=o

