Search the Community

Showing results for tags 'script'.



More search options

  • 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
    • LabVIEW
    • 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

Found 17 results

  1. Nick

    Patterns 1

    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.Channels.DIO1.DIO' [undefined] is not an object." Additionally, the reference manual doesn't show how to automatically set up the signals from the start using the script. For example, how to select the output as PP or Type as Custom. Do I have to set this up manually every time? Thank you in advance!
  2. 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 posts (i could not find any) or examples you might have on this? Thanks, Ryne
  3. 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
  4. agnichatian

    Waveforms Script Printing

    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 eeproms) Why is the output window at the bottom of the script area only one line long. The only thing that shows up there is the results of return statements. How can I see the I2C and run the script at the same time ? The logic analyzer only shows the first two I2C bytes, so I'm using an external scope. What does the manual mean when it says the the I2C can only send when in debug ? Isn't that a show-stopper ? Am I missing some key piece of documentation ? The manual does not say much about how all of this stuff works. - Thanks
  5. 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,
  6. 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 was sending data correctly. To stop the script I had to kill waveforms IDE (v3.7.9). How can I improve it so that I can stop the program anytime I want? Will I have to set a trigger for that using a StaticIO button? Thanks, João Paulo
  7. 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 that trigger options on DIO line decides when events are generated. Is it possible to capture and count edges without sample count limit? I mean something like hardware triggering on digital inputs instead of starting on first trigger and sampling defined number of samples with defined frequency (Stream mode). At the moment it looks more like signals recording and post-processing (offline) and I wonder if it is possible online to execute encoder script live on each trigger? It's not a must but would be nice And one more thing - I have downgraded my WaveForms to version from mentioned topic because in newer version there is no Stream mode. Was it renamed or replaced by something better?
  8. I want to measure Freq vs THD plot . Is it need something script?
  9. Mobinul Hoda

    Analog Discovery

    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
  10. 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) Logic1 data, look for the periodic transmission bursts, convert the encoded waves to a binary character stream (ex: "0101001010") and print it to the screen (or log to file). Is this approach possible, in the way I'm thinking of it? Or is there an easier/better way to approach it? Also, I haven't been able to find many Script samples around the Logic# object. I understand it is similar to the Scope# (for example), but still a closer sample wound be great. Any tips/suggestions? Thanks -John
  11. Frederick Doering

    Set Run Time of Pattern with script

    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?
  12. 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.
  13. 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 it is never explained what a Channel is either. What is a Channel and how is it different from DIO1, DIO2, etc.? Thank you so much!
  14. 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.
  15. 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 i do not want a complicated solution i have already run into problems where the script (or usb) can not keep up with the sample rate of the analog discovery. any help would be awesome thanks!
  16. 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 electronics explorer board?Thank you for your help.
  17. Hi, I am trying to run the python script "Device_Enumeration.py", but cannot seem to load the dwf.dll. When I attempt to run the script in anaconda 2 or Idle (python 2.7.8), I get the following error: runfile('C:/Users/John/.spyder2/py/Device_Enumeration.py', wdir='C:/Users/John/.spyder2/py') Traceback (most recent call last): File "<ipython-input-8-4aa4827489b3>", line 1, in <module> runfile('C:/Users/John/.spyder2/py/Device_Enumeration.py', wdir='C:/Users/John/.spyder2/py') File "C:\Users\John\Anaconda2\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 685, in runfile execfile(filename, namespace) File "C:\Users\John\Anaconda2\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 71, in execfile exec(compile(scripttext, filename, 'exec'), glob, loc) File "C:/Users/John/.spyder2/py/Device_Enumeration.py", line 14, in <module> dwf = cdll.dwf File "C:\Users\John\Anaconda2\lib\ctypes\__init__.py", line 435, in __getattr__ dll = self._dlltype(name) File "C:\Users\John\Anaconda2\lib\ctypes\__init__.py", line 365, in __init__ self._handle = _dlopen(self._name, mode) WindowsError: [Error 126] The specified module could not be found I have copied the dwf.dll to my working directory with no luck. I am running windows 7, 64 bit. What is the best path forward to get this working? How is the Digilent Adept Runtime used? Thanks, John