Jump to content
  • 0

WaveForms Cycle Measurement not outputting correctly in script


br3

Question

Hi all, 

Does anyone know how to print out cycles measurement in logic analyzer using Waveform java scripts? I managed to print out the data for frequency measurement but I'm not sure why the same function does not work well for cycles......

Additional question: Does anyone know if it is possible to print out JTAG TDO data using script? TDO data should look like what is received in the protocol interpreter for JTAG. I managed to create a DO signal line and I can export the data but because it is sampling at a fast rate, I get many duplicates unlike the TDO data printed on the protocol interpreter.

 

Screenshot 2024-07-22 110421.png

Edited by br3
Link to comment
Share on other sites

Recommended Posts

  • 0
Posted (edited)

Hi @attila

Thank you for the TDO method, it worked! I am currently using Waveforms version 3.20.1, is that why "cycles" did not work?

I would like to do some automation with other instruments using C++ and would like to sync the code with my discovery tool. Would you recommend using waveforms sdk instead of scripting? I was looking at the reference manual for sdk, it doesn't seem to include JTAG protocol. Does sdk also include the GUI features like scripting whereby you can do configurations on the gui and the script will take the gui settings into account? 

Edited by br3
Link to comment
Share on other sites

  • 0

Hi @br3

Try updating the software, 3.20 is quite old.
JTAG interpreter is only available in the WaveForms app. It could be implemented with custom application like the SPI is in DigitalIn_Spi_Spy.py

Link to comment
Share on other sites

  • 0

Hi@attila

Do you know if there is a c++ code to run existing scripts and to read script output? Is socket programming possible to connect script with a c++ code? 

 

Link to comment
Share on other sites

  • 0

Hi @br3

You can use file io, serial port, named pipe, tcp to interface Script with other applications, devices... execute/call external apps.
The application has arguments to load and run scripts, or use the eval function to execute script in script.

image.png

image.png

image.png

image.png

Link to comment
Share on other sites

  • 0
Posted (edited)

Hi @attila

Do you have a sample code of how TCP functions work in waveforms scripting? Thanks. I am trying to use Waveforms script as the server

Edited by br3
Link to comment
Share on other sites

  • 0
Posted (edited)

@attila  Hi,

I tried to run synchronous socket client functions in C# to connect with Waveform script server. However, it seems that there are times the data sent is not received on the server side(the same code also works sometimes). Would you recommend using async or sync on C#? Do you know if it is required for me to close the server after one run or can I just keep it listening without closing it until my c# code is finished. 

 

Edited by br3
Link to comment
Share on other sites

  • 0

Hi @br3

I don't know what and how are you transferring.
With such communication if the transfer length is variable you should pass a header, containing message length and identification if you need such. The length is needed for the receiver to know how much more data to expect. This for proper message framing.

Link to comment
Share on other sites

  • 0

Hi @br3

The tcp.listen() calls QTcpServer.listen, accepting socket connections in the background without timeout until close() is called.
I think keepalive is not enabled but the next software version will add argument for this in connect() function. It will also add isConnected() and waitForNewConnection() functions.

Link to comment
Share on other sites

  • 0

Hi @attila

Do you know what are the script functions for setting base and position in the Logic Analyser window. I saw there is .Time.Position.value. Does it help to set or get position?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...