Interfacing of RTSA Suite Pro and LabView
Quote from qureshi000 on 02/04/2024, 09:02Hi!
I am using HiSLIP-SCPI Server block to control Spectran V6 through Labview. The version of RTSA Suite Pro is 2.5 and HiSLIP-SCPI Server block is 2.1. Kindly provide commands manual to control Spectran V6. The manual I got only contains commands regarding IQ Signal Generator.
Hi!
I am using HiSLIP-SCPI Server block to control Spectran V6 through Labview. The version of RTSA Suite Pro is 2.5 and HiSLIP-SCPI Server block is 2.1. Kindly provide commands manual to control Spectran V6. The manual I got only contains commands regarding IQ Signal Generator.
Quote from DevSF on 02/04/2024, 11:22Hi,
In general there is not much difference between controlling the Signal Generator or the Spectran V6 block. The Spectran V6 block does just have much more functionality and configuration items. The documentation is describing how to get the configuration items via the "config?" command. After that you should be able to select and set single configuration items via SCPI commands. I am not sure how the data is interpreted by LABView but you need to tell LABView somehow to interpret the data format for the spectrum or IQ data.
Asking for the "config?" response is for me best displayed and done in the Putty terminal program, with HiSLIP disabled, i can communicate manually directly with the interface. The response to the "config?" query should look similar to this:
Here for example we select the SpectranV6 center frequency via the configuration item "spectran_v6b_0:main:centerfreq". To set the center frequency run the command: "spectran_v6b_0:main:centerfreq 2400000000;"
To get 100 data packets you could call a SCPI command sequence like this:
*cls\n
spectran_v6b_0:main:centerfreq 20000000;*wait\n
stream:count 100; stream:start\n
stream:data?;*wait; stream:stop\n
Hi,
In general there is not much difference between controlling the Signal Generator or the Spectran V6 block. The Spectran V6 block does just have much more functionality and configuration items. The documentation is describing how to get the configuration items via the "config?" command. After that you should be able to select and set single configuration items via SCPI commands. I am not sure how the data is interpreted by LABView but you need to tell LABView somehow to interpret the data format for the spectrum or IQ data.
Asking for the "config?" response is for me best displayed and done in the Putty terminal program, with HiSLIP disabled, i can communicate manually directly with the interface. The response to the "config?" query should look similar to this:
Here for example we select the SpectranV6 center frequency via the configuration item "spectran_v6b_0:main:centerfreq". To set the center frequency run the command: "spectran_v6b_0:main:centerfreq 2400000000;"
To get 100 data packets you could call a SCPI command sequence like this:
*cls\n
spectran_v6b_0:main:centerfreq 20000000;*wait\n
stream:count 100; stream:start\n
stream:data?;*wait; stream:stop\n
Quote from qureshi000 on 03/04/2024, 06:08Hi!
When I run stream:start or stream:stop commands they worked correctly. But when I run the command which you provided to set the center frequency. It runs correctly but does not change the center frequency in the software. All the respective screenshots are attached.
First pic shows the bock diagram. Second and third pic shows the write and read response/output.
Hi!
When I run stream:start or stream:stop commands they worked correctly. But when I run the command which you provided to set the center frequency. It runs correctly but does not change the center frequency in the software. All the respective screenshots are attached.
First pic shows the bock diagram. Second and third pic shows the write and read response/output.
Quote from DevSF on 03/04/2024, 09:52Hi!
You have an '\s' in your command, I guess you copied it from the NIMAX Test Panel which is showing the escape sequence '\s' instead of a space ' ' in the response field. There needs to be a space in between the configuration item and the value, the SCPI Server does not accept the escape sequence as space with '\s' in the command. You could also ask the SCPI Server for errors with the command 'system:error?;'. You could ask multiple times for the error until the error queue is empy and you get '0, "no error"'.
Hi!
You have an '\s' in your command, I guess you copied it from the NIMAX Test Panel which is showing the escape sequence '\s' instead of a space ' ' in the response field. There needs to be a space in between the configuration item and the value, the SCPI Server does not accept the escape sequence as space with '\s' in the command. You could also ask the SCPI Server for errors with the command 'system:error?;'. You could ask multiple times for the error until the error queue is empy and you get '0, "no error"'.
Quote from qureshi000 on 03/04/2024, 14:39Hi!
Spaces are automatically converted to \s in NI-MAX.
However, it is successfully sent as a space to the instrument.
If the measuring device has an error, either the command itself is incorrect, or the procedure (order of sending commands) is incorrect.
This the response from NI Forums
Hi!
Spaces are automatically converted to \s in NI-MAX.
However, it is successfully sent as a space to the instrument.
If the measuring device has an error, either the command itself is incorrect, or the procedure (order of sending commands) is incorrect.
This the response from NI Forums
Quote from DevSF on 03/04/2024, 16:33Hi, they are right it is also with the escape sequence working, they replace it while writing the command, sorry my mistake.
For me it is working with the NI MAX Test Panel, I cannot reproduce your issue.
- What is your system:error? response after trying to set the center frequency?
- Did you checked the name of the configuration item with the config? command? If you remove and add again the Spectran V6 block in the Mission it will increase it's index from spectran_v6b_0 to spectran_v6b_1. Or just test it with a new Mission, the first insertet Spectran V6 block in the Mission will have the index 0.
- What is the RTSA Suite version you are using?
- I see already data in your output. Does the command work if you first write *cls to the device or after restart of the RTSA Suite before asking for data?
Hi, they are right it is also with the escape sequence working, they replace it while writing the command, sorry my mistake.
For me it is working with the NI MAX Test Panel, I cannot reproduce your issue.
- What is your system:error? response after trying to set the center frequency?
- Did you checked the name of the configuration item with the config? command? If you remove and add again the Spectran V6 block in the Mission it will increase it's index from spectran_v6b_0 to spectran_v6b_1. Or just test it with a new Mission, the first insertet Spectran V6 block in the Mission will have the index 0.
- What is the RTSA Suite version you are using?
- I see already data in your output. Does the command work if you first write *cls to the device or after restart of the RTSA Suite before asking for data?
Quote from qureshi000 on 04/04/2024, 05:50Hi!
You were right about index thing. I corrected the index of block. Now it is working. Please give me the command to change the Span. Currently, I am using command "spectran_v6b_0:main:decimation 1 / 2;". But it only works when I write Full instead of 1 / 2, 1 / 4 or 1 / 8 etc. Is there any syntax error?
Thanks
Hi!
You were right about index thing. I corrected the index of block. Now it is working. Please give me the command to change the Span. Currently, I am using command "spectran_v6b_0:main:decimation 1 / 2;". But it only works when I write Full instead of 1 / 2, 1 / 4 or 1 / 8 etc. Is there any syntax error?
Thanks
Quote from mm_dev on 04/04/2024, 09:51It is probably an issue due to the values containing spaces themselves. You may have to put the values in quotes, or try using indices instead (0 = "Full", 1 = "1 / 2", 2 = "1 / 4" and so on).
It is probably an issue due to the values containing spaces themselves. You may have to put the values in quotes, or try using indices instead (0 = "Full", 1 = "1 / 2", 2 = "1 / 4" and so on).
Quote from qureshi000 on 04/04/2024, 11:00I tried with indices, quotes and both but nothing is working. Kindly try it by yourself and then reply with correct syntax.
Thanks
I tried with indices, quotes and both but nothing is working. Kindly try it by yourself and then reply with correct syntax.
Thanks
Quote from DevSF on 04/04/2024, 11:02Ah, yes there was an issue getting/setting an enum value with spaces in it. I fixed it, the spaces are now removed from those values. For example it looks now like this:
spectran_v6b_0:main:decimation { Full | 1/2 | 1/4 | 1/8 | 1/16 | 1/32 | 1/64 | 1/128 | 1/256 | 1/512 } | Descr.: SpanThe updated HiSLIP-SCPI Server block package is online you can update it in the RTSA Suite.
Ah, yes there was an issue getting/setting an enum value with spaces in it. I fixed it, the spaces are now removed from those values. For example it looks now like this:
spectran_v6b_0:main:decimation { Full | 1/2 | 1/4 | 1/8 | 1/16 | 1/32 | 1/64 | 1/128 | 1/256 | 1/512 } | Descr.: Span
The updated HiSLIP-SCPI Server block package is online you can update it in the RTSA Suite.