04-05-2018 10:15 PM
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) .
The VBA code is above.
This part of the code is having sys error on labview:
Solved! Go to Solution.
04-06-2018 12:39 PM
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)?
04-07-2018 10:19 PM
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
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
04-08-2018 06:09 AM
I found the command on another analyser version to do memory transfer from PC to Analyser.
:MMEMory:TRANsfer <string>,<block>
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.
04-09-2018 12:16 PM
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
04-12-2018 08:35 PM
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.
04-13-2018 07:02 AM
@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.
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.
<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.
04-15-2018 07:09 PM
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>.
04-15-2018 07:09 PM
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>.