Forum
Please or Register to create posts and topics.

Requested examples of usages of the script block

Hello

I'm interested in your script block for the calculation of a BER. This is the chain i want to implement

File Reader ---> Spectra to IQ (Optional if I manage the stream coming out of the file to be IQ already) --->

Script Block: comparison of the two IQ inputs

V6 250X ---> Spectra to IQ (optional V5 block has IQ output)  --->

I have two major questions:

  1. is there a tool for the conversion of a signal/spectrum to an IQ file? I have seen the presence of an "IQ Demodulator", but it accepts IQ input so i guess it is not it.
  2. Are there any examples for the Script Block? What coding language should I use? How do I reference the inputs that the block is accepting? How do I write the output to a file?
Uploaded files:
  • ExampleChain.png

Hi Lorenzo,

We have already a requirement to integrate the calculation of the Bit Error Rate into the Aaronia RTSA Suite. If you have some time I think it will be integrated soon depending on priority. It is also possible doing it with the Script block, but this requires some signal processing knowledge and programming effort. It is not just comparing the values of two IQ data streams( keywords: sample rate, symbol rate, synchronization etc)

  1. is there a tool for the conversion of a signal/spectrum to an IQ file? I have seen the presence of an "IQ Demodulator", but it accepts IQ input so i guess it is not it.

The IQ Demodulator block just „extracts“ an IQ data window( centerfrequency, bandwidth, + gain ) in the IQ data input stream and forward this to the IQ data output.

If you have complex spectrum data (https://en.wikipedia.org/wiki/Complex_number) you can invert it mathematically back to IQ data by an inverse FFT. But once you have a real spectrum, which is often the case, you cannot go back to IQ data. In the RTSA Suite there are IQ data source blocks to get IQ data, for example the Spectran V6 block, the IQ Signal Generator block or the File Reader block by replaying an IQ data record .

From IQ data to spectrum data you can easily use the IQ Power Spectrum block which is doing an FFT. The other way around (inverse FFT) is not often needed, cause the time domain is the base of the frequency domain calculation ( https://en.wikipedia.org/wiki/Time_domain ).

2. Are there any examples for the Script Block? What coding language should I use? How do I reference the inputs that the block is accepting? How do I write the output to a file?

Please be patient here, we will add examples over time to the Java Support section. We heavily use the Script block internally for licensed RTSA blocks or specific customer projects, it is quiet powerful.

The Script block supports the Java Script syntax, in the Java Support section you can find the libraries and feature description. For sure there are some examples missing.

By the way you can write directly into file using the Script block:

import { File } from "fs.js";

File.write(E:/test.csv", UTF8.encode(“Hallo World“));

Hi,

Could you please share more some examples and functionality of Block Script?

Thanks.

For functionality, please refer to the documentation in the corresponding forum section: https://v6-forum.aaronia.de/forum/topic/rtsa-suite-pro-java-script-support/

Here is a very basic example for a script block to show the typical skeleton of a block with configuration options (not including actual data processing).

 

Uploaded files: