LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Transfer STA files from external PC to Analyser

Solved!
Go to solution

Hi I was looking for some command or labview code if anyone has successfully transfer .sta files from external pc to analyser. I'm using VISA command (USB as the resource) .

 

https://download.keysight.com/WN/E4990A_Help.pdf?authparam=1522883652_5d5a413d1c2c307df9dd73dfdd5f14...

The VBA code is above.

 

This part of the code is having sys error on labview:

strBuf = ":MMEM:TRAN " & Ana_File & ","
Ana.WriteIEEEBlock strBuf, byteData, True
Tried to manually feed the Byte data but it showed undefined header on the analyser.
 
Attached is my code.
Thanks.
 
 
 
0 Kudos
Message 1 of 9
(4,077 Views)

Hi Arrquin:

 

    What does the error say? 

    Also, have you tried other communications between LabVIEW and the Analyzer (like just querying the instrument either in LabVIEW or in a VISA test panel)?

0 Kudos
Message 2 of 9
(4,033 Views)

I was able to tranfer sta files from Analyser to PC.

But unsuccessful on transferring from external PC to analyser.

 

The error is -> SYST:ERR? <- -113,"Undefined header"  seen on the IA.

 

The command on VBA is here 

http://ena.support.keysight.com/e4990a/manuals/webhelp/eng/programming/remote_control/saving_recalli...

   strBuf = ":MMEM:TRAN " & Ana_File & ","

    Ana.WriteIEEEBlock strBuf, byteData, True

 

 

Need to know the required  command and  formats for Labview.

What do we need to pass to the WRITE VISA (Serial).

Attached is the code I'm simulating , as I'm converting the VBA code from the manual.

 

Thanks

tranfertopc.JPG

0 Kudos
Message 3 of 9
(4,017 Views)

I found the command on another analyser version to do memory transfer from PC to Analyser.

 

:MMEMory:TRANsfer <string>,<block>

from keysight.JPG

My question now is how can I convert the external PC file (e.g state.sta) as Block data transfer format in labview.

thanks for your help.

 

 

0 Kudos
Message 4 of 9
(4,011 Views)

Have you checked if there is a LabVIEW driver for such Analyzer? I am not that familiar with that instrument but looking at this forum post: 8753xx series read and graph proper calibration it seems that this instrument has built code in the driver that reads from the analyzer (it probably uses VISA).

 

You can search for LabVIEW drivers in the Instrument Driver Network 

 

 

 

0 Kudos
Message 5 of 9
(3,997 Views)

I have the driver for the analyser from labview basically all the functions and vis are now complete.

Except that file transfer from PC to Analyser as we wanted to transfer the state file from PC to analyser.

There  is a limitation issue as labview could not write a <datablock> format.

 

When file is converted to other formats known in labview the analyser will have undefined header error.

Undefined header - Indicates the header is syntactically correct, but it is undefined for this specific device.

0 Kudos
Message 6 of 9
(3,966 Views)
Solution
Accepted by topic author arrquin

@arrquin wrote:

I have the driver for the analyser from labview basically all the functions and vis are now complete.

Except that file transfer from PC to Analyser as we wanted to transfer the state file from PC to analyser.

There  is a limitation issue as labview could not write a <datablock> format.

 

When file is converted to other formats known in labview the analyser will have undefined header error.

Undefined header - Indicates the header is syntactically correct, but it is undefined for this specific device.


Not sure what you mean by saying that "There  is a limitation issue as labview could not write a <datablock> format". LabVIEW is NOT the issue. LabVIEW only does what you tell it to do. Your problem is that you created a command with multiple syntax errors. It's no wonder that the instrument reports back with an "Undefined header" error.

 

I absolutely HATE debugging "pictures", but I will give it a go. Looking at your Probe Display, I see several problems with your syntax.

Probe Display.PNG

 

1. The command is :MMEM. Notice that the mnemonic ends with an "M". It is not :MMEN

 

2. There needs to be a SPACE between the command and the <string> designating the filename. i.e., :MMEM:TRAN  "D:\12.sta",...

 

3. Why are you using "#6" in the block header? You hard coded the block data size as 4099. That has FOUR digits not six. The header should be #44099...

 

4. Why are you hard coding the header in the first place. Are you absolutely sure that the file size is ALWAYS 4099? It's pretty simple to write the code to create the header at runtime.

 

5. You appended a <CR><LF> at the end of the block. Strictly speaking, the IEEE block transfer spec does not specify a termination character at all, just an EOI. HP/Agilent/Keysight instruments appear that they do not follow the spec and needs only a <LF> termination character.

keysight format.PNG <image from Keysight Website>

 

 

Below is how I would approach transferring the STA files from PC to instrument. Try it. You may still need to tweak the snippet. I may not have caught all the syntax errors.

STA_Transfer PC_to_Instr.png

Message 7 of 9
(3,955 Views)

Hi Jamiva,

 

The limitation issue from NI arise when we are trying to duplicate the syntax from command tool expert which is passing of databytes array for the <block data>.

commaseparateinteger.JPGmemtrans.JPG2018-04-13 08_22_50-cbo-atbrftc02.cochlear.com - Remote Desktop Connection.pngfrom keysight.JPG

0 Kudos
Message 8 of 9
(3,940 Views)

Hi Jamiva,

 

The limitation issue from NI arise when we are trying to duplicate the syntax from command tool expert which is passing of databytes array for the <block data>.

commaseparateinteger.JPGmemtrans.JPG2018-04-13 08_22_50-cbo-atbrftc02.cochlear.com - Remote Desktop Connection.pngfrom keysight.JPG

Download All
0 Kudos
Message 9 of 9
(3,939 Views)