Jump to content

PBritten

Members
  • Posts

    2
  • Joined

  • Last visited

PBritten's Achievements

Newbie

Newbie (1/4)

0

Reputation

  1. Hi @attila Thanks for this, worked a treat! Best wishes Paul
  2. Hi Guys, I'm new to the AD2 & Waveforms, and in the need of some help. I'm trying to import a csv file into a custom wavegen and then output it. Here is my code: if(!('Wavegen1' in this)||!('Scope1' in this))throw"Please open a Scope and a Wavegen instrument"; var filename = "/Users/PaulBritten/Documents/AFWorkMain/AFWork/Waveform/single_qrst_improved_twave_1khz.csv"; var file = File(filename); print("exists? " + file.exists()); var arr = file.readArray(); print(arr); Wavegen1.Channel1.Mode.text = "Custom"; Wavegen1.Channel1.Custom.Type.set("MyWave", arr); Wavegen1.Channel1.Custom.Type.add(arr); Wavegen1.Channel1.Custom.Offset.value = 0; Wavegen1.Channel1.Custom.Frequency.value = 1; Wavegen1.Channel1.Custom.Amplitude.value = 1; Scope1.Trigger.Trigger.text = "Repeated"; Wavegen1.run(); Scope1.run(); Can anyone explain to me why I'm getting this error: Thanks for any help in advance. Best wishes Paul
×
×
  • Create New...