Jump to content

NManteufel

Members
  • Posts

    5
  • Joined

  • Last visited

NManteufel's Achievements

Newbie

Newbie (1/4)

1

Reputation

  1. I'm trying to write a python script to control the power supply, V+ on an Analog Discovery 3. From reading the help documentation, it sounds like this is possible but I'm looking for an example. I need to set V+ to 5.0V at the beginning of my script and 0V at the end. Can anyone share an example of how to do this?
  2. It's not working. This is the full example, I am using the GPIO to switch a relay (HE3621A0500) and the scope to read the signal. StaticIO.Channel0.DIO[0].text = "1"; // VDD_2V9 CONNECTED wait(1) // Allow to stabilize Scope.single(); if(!Scope.wait()) throw "Stopped"; var average = 0; var data = Scope.Channel1.data; data.forEach(function(sample){average += sample;}) average /= data.length; Math.floor(average * 1000) / 1000; print("VDD_2V9\t\t\tP4\t\t"+average+" V"); StaticIO.Channel0.DIO[0].text = "0"; // VDD_2V9 DISCONNECTED
  3. In my Javascript script, I am trying to truncate an average to three decimal points, but Math.floor(average*1000)/1000; is not working. How can I truncate "average" to three decimal points?
  4. I'm beginning to use the Analog Discovery 3 to create small easy-to-use test fixtures for PCBs we manufacture. While developing my scripts I'm using MobaXterm to SSH into a Raspberry Pi 5 running Waveforms and running my python scripts manually. It works, I love it. I want a more user friendly interface for the technicians. Is there a way to run custom python scripts from the waveforms GUI? I don't see one. It would be cool if I could put a script in a folder and from there it appears in a drop down menu option somewhere in the waveforms GUI. What is everyone else doing?
×
×
  • Create New...