Search the Community

Showing results for tags 'script'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News
    • New Users Introduction
    • Announcements
  • Digilent Technical Forums
    • FPGA
    • Digilent Microcontroller Boards
    • Non-Digilent Microcontrollers
    • Add-on Boards
    • Scopes & Instruments and the WaveForms software
    • LabVIEW
    • FRC
    • Other
  • General Discussion
    • Project Vault
    • Learn
    • Suggestions & Feedback
    • Buy, Sell, Trade
    • Sales Questions
    • Off Topic
    • Educators
    • Technical Based Off-Topic Discussions

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

  1. Hello, I am trying to get captured data from Logic DIO0 channel via script. I would expect array of 0 and 1. But getting all zeros (see picture attached). Where I go wrong? Thank You. Best Regards Ondrej
  2. Hi I am new with AD2 and love using is so far. I need to create a measurement script to measure the time between minimum and max values. rise time function does not work correctly for my application for some reason. thank you in advance. thanks
  3. Hi, Can anyone tell me if it is possible, from within the <Scope/Math channel/Custom scripting> environment to access instrument objects like Wavegen1, Logic1, Logger1, ... and their sub-objects? And if it's possible, how to do it? Thanks in advance for your help. Kind regards.
  4. Hello, In my waveforms script I am trying to import and run a saved custom 7-bit bus pattern in csv format that I generated from the custom pattern generator. I am able to read the data from the csv, but when I do: Patterns1.Channels.Bus._custom = data all of the data is just written into the first channel of the bus. Is there another format or syntax that should be used when specifying patterns for custom busses?
  5. Hi, I combined a few python scripts from the SDK (AnalogIn_Acquisition, AnalogOut_Play and AnalogOut_Sine) to write a script which is intended to run during the night and save the scope's data into a WAV file. All looks somewhat okay, but there are a few things that don't look perfect. For this test, I connected CH1 and W1 and started both the Scope and Signal generator in the script. I'm intending to generate a 80 Hz sine wave and record it with the scope running at 8 kHz. I attach the whole script, and here are the important parts: # set up signal generation channel =
  6. Hi, I have been using the Waveforms in Mac to control digital discovery. And I am now familiar with using the scripts in Waveforms. I want to use Tool.start option to run python from Waveforms. Below is the command I am using based on the format. But I haven't been successful with running python. Tool.start("/Users/venkatap/anaconda2/bin/python", "/Users/venkatap/Waveforms_v1/py_files/run_file.py","/tmp/") As all the examples and discussions about this topic are related to windows machine, I wanted to know how to use the Tool.start option in Mac. Kindly assist me with this.
  7. Szia @attila! I'm using WaveForms 3.8.18 on Windows 10. I would like to chart the difference between the currently measured AC RMS compared to the average of the past x values. Is it possible to do with a script? Theoretically, if I could access the past values of the C1ACRMS from script it would be possible to calculate the average and the difference from that average. Or as another approach, can I access the current value of the "Average" column in the script? Let's say I name this script-based signal C1ACRMSDelta. I created another one for C2, and name it C2ACRMSDelta. Wi
  8. I want to measure Freq vs THD plot . Is it need something script?
  9. Hi, since forum search did not yield much on subject and there seem to be no built in functions did write little something and decided to share below: Script is quite automatic. It will account for sampling rate, memory depth, oversampling changes in real time - just run it to auto create and configure Ref* channels that will display functions. Possible need fiddle Range a little for integration. If wish reset to auto values just disable/delete Ref* and it will instantly re-enable in default configuration. Attached script is provided in demo mode, does integral(derivative(x)) functional che
  10. Hi, I'm working on a WaveForms script which would be able to generate chart with the frequency profile of a liquid. For this, I need to use a Wavegen and a Scope: first I need to set the generator to a certain frequency and then I'd like to check the power of that signal on the scope. Between the probes of the generator and the scope there will be the liquid I would like to test. I created a basic script to step from 1 Hz to 150 Hz, check that signal with the scope, repeat this loop 5 times, and calculate the min, max and average values at each frequency. Although the script w
  11. I'm trying to write a script to custom define signals on the Patterns tool by following the code in the reference manual. However, these are not working: Patterns1.Channels.DIO1.name = "Testing" <- Doesn't change the name of the signal, but once I click on the edit button the pop window shows it as "Testing". Once I run the program a second time it get an error for "Patterns1.Channels.DIO1.name = "Testing"" and it's not resolved until I change it to "Patterns1.Channels.Testing.name = "Testing"" Patterns1.Channels.DIO1.DIO.value <- Returns: " Result of expression 'Patterns1.Ch
  12. Hi, I recently wrote a program that runs on the AD2 to close the loop on a system I am controlling. My problem now is that I will have a person unfamiliar with coding using this. I was wondering if there were options for creating a simple GUI to control inputs into my script. Like polling from a slidebar the frequency of a sine wave, I use in the script or test windows. I am particularly looking at the StaticIO but it seems to be limited to only the digital I/O pins. If it is not available thru Waveforms Beta will the SDK be able to do something like this? Are there any previous pos
  13. Hello, So I am trying to write a script that will be taking advantage of both output and both inputs to the AD2 as well as take select information and send it out to two (for now) serial lines. I have written a script to control everything I need minus the actual setup of the UART settings, sending the data over the Tx line and receiving over the Rx line. Are there any examples of how to send the data over script as opposed to using the built-in GUI of Waveforms? Thanks, Ryne
  14. Hello, I have an Analog Discovery (legacy) and the latest Waveforms app. I am trying to write a script that makes the protocol module write to a 24C16 eeprom, read it back, and print to the screen or window. I can access th I2C (can see on my scope), but I can't print anything. The print() function does nothing unless in debug mode, but then the app seems to hang. I tried Custom mode and Sensor mode. And I tried the ADXL345 example, with a known good breakout board, and it always returns the same thing, doesn't change with orientation of the chip (but my main concern is the eepr
  15. I am new user of Waveforms 2015 and the Digital Discovery. I want to generate SPI signal and DIOs, to read from multiplexed-CH ADC. According to "Help" on WaveForms, DIO can be set using "DIO." in script for Protocol-SPI. (Help -> Protocol -> 2. SPI -> about Custom mode -> " DIO.: Lets you set(the ones are not declared as SPI signal) and red the digital pins." ) but I can't find its description. So, could I have the example how to use "DIO." in script for Protocol-SPI ? * I'm using WaveForms Ver:3.7.5 32-bit Qt5.6.3 Windows7. Thanks
  16. Hi everyone, I need to write a script to control the UART Protocol so that I can simulate a serial conversation. So far, I've got just this code: var MyString = "@T00."; function Serial_Send(){ print("Automated Serial Writer"); for(;;) { // Loop at 0.1 sec rate wait(0.1); Protocol.UART.Send(MyString,false); } } if(!('Protocol' in this)) { throw("Please open Protocol instrument"); } Serial_Send(); The configuration of my serial is attached Of course, the endless loop didn't allow me to stop the Script or even abort it. But, it
  17. Hello, I have found this topic with script for counting edges of digital signals and I wonder if it's possible to modify it somehow (or use completely different approach) to read quadrature encoder signals with Analog Discovery? Most important thing, I think, is that I have to compare signals state at current event (i.e. I have "1" on signal A and need to know what is the state of B signal in that particular moment) and be able to compare it with previous state (event) to decide if I should increment or decrement my counter. And it should be triggered with both edges but I assume th
  18. Dear developer, I am using the analog discovery of older version(http://store.digilentinc.com/analog-discovery-100msps-usb-oscilloscope-logic-analyzer-limited-time/) I bought it long back for academic purposes. Now, my issue I am facing is I want to write a piece of code just to store the data while my analog discovery is aquring the signal. Is there any program or any code available with you in your documentation. If it is not then can you help in writing the code? Thanking You
  19. Hi folks, I'm currently hacking a 433Mhz temperature probe, and attempting to intercept the reading using a standard 433Mhz receiver, such as the Sparkfun RF Link Receiver. Using WaveForms (desktop) I can record the Logic Analyzer output, and can see the single fine. I'm currently in the process of parsing the bit stream. The signal is repeated every 59 seconds. However I need more samples, and the manual translation of the square wave to 0/1's is tedious and time consuming (and error prone). I'd like to create a script that will read the 'repeated' (not recorded, realtime) Logi
  20. I'm using WaveForms2015 version 3.6.8 In the help files it specifies .Run.value under patterns yet it appears to be undefined: .Patterns# .States .Trigger.text .Wait.value .Run.value .Repeat.value .RepeatTrigger.checked my script: var AAtemp=Patterns1.Run.value; and the error message I receive: Error in line: 1 TypeError: Result of expression 'Patterns1.Run' [undefined] is not an object. I would like to set the run length of the pattern via script. How can I go about this?
  21. Hi, I have a SPI slave design with 4-mode and can be auto change by custom script, after updating to 3.6.8, the POL & PHA seems be locked on the upper settings, only the POL & PHA value on the upper settings are valid, even I un-check the "Settings". How can I solve it? thanks.
  22. Hi, I'm trying to use the Analog Discovery 2 to control a stepper motor driver board. All I need to do is send an output (5V) signal using a DIO. I find the Waveforms 2015 manual to be lacking in terms of documentation for this - it does not explain how to give an output signal. How do I do this? Thanks! For instance, the reference manual has this sample code: function doStaticIO(){ print("Running StaticIO script"); StaticIO.Channel0.Mode.text = "IOs"; for(var c = 0; c < 8; c++) { StaticIO.Channel0.DIO[c].Mode.text = "Switch"; } But
  23. Hello, I want to find a maximum value during a period with a script on the scope. I have done that but the result is wrong: Scope1.single() Scope1.wait() Scope1.Time.Base.value = (1/freq) var data = Scope1.Channel1.data data.forEach(function(sample){ Vin_Max = Math.max(sample); }) print("Vin_Max: ",Vin_Max,"V") Do you have an idea? Thank in advance.
  24. Hi, I am using an analog discovery to record relay trips. The goal is to record voltage a set time before the trigger and a set time after the trigger. i am writing the average and time to an array and saving the array to a csv file once the after trigger is complete. currently i am using the default script that comes with the program. it works and i get the information but the time stamp using Date() gives hh/mm/ss and i need smaller units of time. My question is: How can i get an accurate time stamp using the script? I need to maximize the number or samples i can take so
  25. We got the following question: Hi,I'm using your software WaveForms 2015 coupled with your Electronics explorer board to generate 2 synchronised wave form. Now I need to automate my test in which I have a sine1 as reference and a sine2 used as signal. In my automated test I want to change the phase of my sine2 from 0 to 360 and make measurements for each phase shift. My goal would be to have an input and each time my input has a raising edge my sine2 will be shifted by 1 degree. Is it possible to script with this tool under Linux or Windows? Or are there a way to do this with the electron