Jump to content

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
    • Test and Measurement
    • Measurement Computing (MCC)
    • Add-on Boards
    • Digilent Microcontroller Boards
    • Non-Digilent Microcontrollers
    • LabVIEW
    • FRC
    • Other
  • General Discussion
    • Project Vault
    • Learn
    • Suggestions & Feedback
    • Buy, Sell, Trade
    • Sales Questions
    • Off Topic
    • Educators
    • Technical Based Off-Topic Discussions
    • Archived

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 9 results

  1. Hello, I'm writing a script in Waveforms - Protocol - SPI - custom window. I wanted to change First bit: MSBit to LSBit. I can assign all other values but I couldn't find First bit assign script anywhere. Does anyone know the script to change the "First bit" value? ------------------- Select.Active.value = 0; Clock.Polarity.value = 1; Clock.Phase.value = 1; Clock.Frequency.value = 100e3; // 100kHz Select.value = 3; //Assigns pin Analog Discovery 2 DIO 3 Clock.value = 2; //Assigns pin Analog Discovery 2 DIO 2 DQ0.value = 4; //Assigns pin Analog Discovery 2 DIO 4 // // SPI: MOSI DQ1.value = 5; //Assigns pin Analog Discovery 2 DIO 5 // SPI: MISO ----------------- Thank you! Choon
  2. This is no important issue, I'm just doing some finger exercises with Waveforms. The thought behind my actual problem: When signals enter the analyzer through different ways like isolators and such, they gather different time offsets. As the Waveforms logic analyzer provides no timeshift functionality out of the box I came to think about a custom logic script to move the data of one channels rgData array to rgValue with an offset index. But to calculate the array offset from the expected time offset I would need to know the actual sample rate of the data. This data I don't have because custom logic scripts don't have access to the Device information. Would it make sense, or be feasible, to provide a time offset functionality for each channel? Would it make sense to provide access to the device settings in a custom logic script?
  3. Hi Attila I am now the proud owner 3 Digilent Analog discover devices . ( 2x AD2 & 1x ADP3250 ) I have posted many post on the forum you can just make search for SIB in the forum and you will find all my posts. I would like you help to get this standard driver set up and running using the Java script engine of Waveforms . Below is the script that I want to get working and also is a waveforms work bench file also . This is after all the real power of the waveforms work bench and Analog discovery and professional devices Best wishes Simon --------------------------------------------------- function UART_data_collect() { // ------------------------------------------------------------------------------------------------------------ // // The aim of this script is to collect data from a UART serial stream from a embedded microprocessor board // and process the data from serial stream and display the result on the scope display // // ------------------------------------------------------------------------------------------------------------ // // Status // // 1) Code executes without error // 2) Code does not receive data from the UART serial port // even through the same ports are used manually to recieve data // from MCU using the manual protocol window with the same settings. // Steps to add A) Serial stream Protocol handler B) Scope display script // // ------------------------------------------------------------------------------------------------------------ clear(); // clear Output log Protocol.run() Scope.run() if(!('Protocol' in this)) throw "Please open the Protocol instrument"; if(!('Scope' in this)) throw "Please open the Oscilloscope instrument"; Protocol.Mode.text = "UART"; // make sure UART tab is selected Protocol.UART.TX.value = 0; // Set up UART TX pin on Digilent AD2 :: DIO_0 Pin Protocol.UART.RX.value = 1; // Set up UART RX pin on Digilent AD2 :: DIO_1 Pin Protocol.UART.Bits.value=8; // Sets or gets the UART number of bits. Protocol.UART.Parity.text="None" ;// Sets or gets the parity setting: “None”, “Even”, “Odd”, “Mark (High)”, “Space (Low)”. Protocol.UART.Rate.value=234000; // Sets or gets the baud rate setting Protocol.config(); // apply configuration changes now Protocol.UART.Receiver(); // reset receiver - that is too start receiving data print(" UART Serial Bus initialised . Beware this is 3V3 Logic RS232 & Not True +/- 15V Rs232" + "\n\r" ); print(" UART TX line connect to AD2 DIO Port " + Protocol.UART.TX.value + "\n\r" ) ; print(" UART RX line connect to AD2 DIO Port " + Protocol.UART.RX.value + "\n\r" ) ; print("\n\r"+" UART initialisation complete " + "\n\r" ) ; Scope1.Time.Rate.value = 0.2; Scope1.single(); //Scope1.wait(); Scope1.Ref1.Clone(Scope1.Channel1); Scope1.Ref2.Clone(Scope1.Channel2); Scope1.Ref1.enable = true; Scope1.Ref2.enable = true; var rx = [] var rx_process = [] while(wait(0.2)) { // wait 0.2 sec and repeat while not stopped rx = rx.concat(Protocol.UART.ReceiveArray()) // append new words if(rx.shift()!=0x0A) { continue; } else { // read one of text ; rx_process=rx; rx=[]; Print( rx_process ); } // (rx.length>10) // if(rx.shift()==0xAA) continue; // if (rx[1] == 0xB5 && rx[2]== 0x11 && rx[7] == 0x09) // { // find the temperatures for displaying // // // print ("Temp 1: " + (rx[8]/2).toFixed(1) + " °C Temp 2: " + (rx[9]/2).toFixed(1) + " °C"); // // } // decimal data devided by 2 bring °Celsius // //Scope1.Ref1.data = } // // ref https://forum.digilentinc.com/topic/21308-ad2-protocol-uart-script-reading-vaillant-ebus/ // // https://forum.digilentinc.com/topic/21353-use-of-multiple-protocol-uart-ports-via-script-possible-at-different-times/ // // notes // ===== // // 1. On the AD and AD2 the digital IO pins use LVCMOS 3V3 standard. These are supplied at 3.3V and have 200 Ohm PTC and clamping diodes to GND and to 3.3V for protection. // It will drive the digital wires at 3.3V and connecting 5V signals directly, without series resistor, it will sink about 10mA through the PTC and 3v3 diode. // As for noise, make sure to have ground connection between the two devices. // // 2. The WF/Protocol/UART uses the Stop length option only for transmission, this is not relevant for reception. // // 3. The UART TX filed lets you type in characters, hexadecimal values are not supported here. // Special chars you can copy/paste from other place or send from file. } //************************************************************ // Main program block : Start //************************************************************ clear(); // clear display screen print(" Script Main body start " + "\n\r "); UART_PID_data_collect(); //************************************************************ //************************************************************ // Main program block : Stop End ADP3250_UART_DATA_TO_SCOPE.dwf3work
  4. I've been trying (unsuccessfully) to set up a Digital Discovery to trigger when multiple conditions are met. I've tried using the Pulse options but I can't see a way of linking multiple signals so I guess I need to use a script. Basically, I want to detect a 960ns pulse on DIN6 and, after it has been detected, trigger if any of four signals (DIN 1, 2, 4 or 5) fails to transition high to low within +/- 30ms. Could someone point me to a sample script that I can use as a starting point to do this?
  5. Hello ! Currently, I'm trying to use the script editor to automate patterns generation from csv files. I was wondering if it was possible to add (and also remove) a channel from the script (and specify it Name/Pin) ? In fact, in the csv I use the number of signals (channels) can vary from one to six. Here is my script for the moment, the while loop allows me to manage the changing number of signal in the csv file. Any help would be appreciated. Thanks, Aurélian.
  6. The marketing video for the digital discovery shows a script that reads the output of a vga port and outputs a document of the image. Is that script available anywhere?
  7. 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
  8. 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
  9. 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.
×
×
  • Create New...