Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Sorensen/Ametek XG series USB LabView Control

when I am sending VER to device with the programme PS_CTRL4. i am getting error in VISA read byte count. Error code is -1073807339. can you suggest any changes in byte count. Also, Do i need to chamge the setting from LOCAL to SERIAL in RF Generator as it is mentioned in manual that (The serial connector is a DB9 female located on the rear panel of the
generator. Serial control and status signals are available at this connector for
operation of the generator. The generator responds to inputs from this
connector when the generator ‘Settings’ are set to ‘Serial’.).

I am attaching the error screenshot. Please help me.

Download All
0 Kudos
Message 41 of 54
(456 Views)

Hi

When i am sending my query command like VER, FOR,ALM one by one but RF generator is showing error in VISA Read. Some time it is giving error -1073807339. Then i changed byte at count with visa byte at port instead of constant value  1024 or 200. Then error were gone but some random abitrary response i am getting. Then again i removed byte at port and changed to constant value and this time i had changed baud rate in generator from 19200 to 9600 then i am getting the response what i am sending. Like if i am sending FOR then in response also i am getting FOR.

I am unable to solve this issue that where i am doing mistake. Please help me.

Also in manual it is mentioned that 

The serial connector is a DB9 female located on the rear panel of the
generator. Serial control and status signals are available at this connector for
operation of the generator. The generator responds to inputs from this
connector when the generator ‘Settings’ are set to ‘Serial’.

I am attachung my vi code along the error and manual of my RF Generator. Please refer section 2.5.6 in the manual for detail information about serial command and serial settings for serial communication.I have done serial setting in the RF Generator also.

0 Kudos
Message 42 of 54
(455 Views)

Hi,

Today i tried to send all the query command to RF Generator through terminal software using serial communication. I got response of most of the the command but i got NAK(Negative Acknowledgement) for few command like RPS, CMP. and now i want to make labview VI for all the serial command.

So please guide me that why i am getting NAK for few command and can you please make one sample vi for serial communication for query command . Similarly i can extend for write command and all the other.

 

Thanks

Prashant Kumar

0 Kudos
Message 43 of 54
(446 Views)

NAK is a negative acknowledgement from the instrument.  It implies that there was an error in the command/query that was received.  Meaning there was a typo in the entry, or a missing parameter.

 

Seeing how it understands: VER, ALM, and others, it appears to be communicating properly.  I do not know enough about this GEI RF Generator to understand what is missing.  I have been unsuccessful finding the programming/remote operation manual.

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 44 of 54
(428 Views)

Hi  Sir

I made one labview programme for serial control of my RF Generator.

I am sending command sequentially i.e. one by one and Response is coming fine with property node (response is having multiple line)

Now i want to send all the command as once using Array of string. 

I have tested one by one all my 28 command but now  i want to make GUI screen in which i want to send group of command at once using string of array or somethiing like that.

I have categorize my command types in various categories- Serial setting, Initialize, operation, matching inf etc.

But i want to send command in a group rather than invidually.

Also for RF ON/OFF, led control button to ON and OFF RF. 

i have attached the my programme and i have mentioned my command in group A. 

Also one more thing that in my array of string i am unable to save the changes in programme list. Can you please help me also in editing and saving command list in Array of string. 

Please help me making the Final GUI. I have attached the invidual testing of my programme one by one.

I am attaching manual for serial programming command.

Download All
0 Kudos
Message 45 of 54
(391 Views)

Sir

 

I have prepared the LabVIEW programme for sending all the command sequentially.

I have attached my programme.

1.)  I want to select only limited string from the command response.

e.g. Response of VER command is- 
VER, AX5000_2.40.4c
>OK
>

So, want to display only AX5000_2.40.4c i.e. I want to extract output as AX5000_2.40.4c.

How to do this?

 

2.) I want to send few sets of command in one Array of string like right now i am sending VER and ALM command using Array of string with carriage return constant separately for each command.

How to do this?

 

I am attaching my new vi and screenshot of output received from my device.

Please reply.

 

0 Kudos
Message 46 of 54
(374 Views)

PLEASE SUGGEST CHANGES IN MY PROGRAMME AND IMPROVE MY LABVIEW CODE. 

Sir

 

I have prepared the LabVIEW programme for sending all the command sequentially.

I have attached my programme.

1.)  I want to select only limited string from the command response.

e.g. Response of VER command is- 
VER, AX5000_2.40.4c
>OK
>

So, want to display only AX5000_2.40.4c i.e. I want to extract output as AX5000_2.40.4c.

How to do this?

 

2.) I want to send few sets of command in one Array of string like right now i am sending VER and ALM command using Array of string with carriage return constant separately for each command.

How to do this?

 

I am attaching my new vi and screenshot of output received from my device.

Please reply.

0 Kudos
Message 47 of 54
(344 Views)

I am trying to teach you how to work with this and many other instruments that you may encounter in the future.  Much of this is in the PS-CTRL_4.vi from earlier.

 

Here are my suggestions for your project:

  1. Turn your input selection into a Menu Ring
    • First Element (0) is <Choose>
    • Second Element (1) is String
      • When this option is selected, it uses the value within the String Control rather than the [Strings] value of the Menu Ring Property Node.
    • All other Elements (2+) are commands that require no added information are appended to the Menu Ring options.
      • Those requiring additional information will need to be entered in the String Control when selecting the second element in the Menu Ring.
  2. Place the Menu Ring within a While Loop that exits once the value is greater than 0 (Not equal to option <Choose>).  Also, add a 20ms delay in the loop.
  3. Do not repeat the entry multiple times as it might create an issue trying to open the communication to the same instrument.  Each communication to an instrument should contain (Open, Write/Read, and Close).  Re-use this single instrument control for your one instrument.  Do not try to batch mode how it communicates as this will only cause headaches and improper functioning of the equipment.
  4. Your instrument repeats the command and provides a status in its full response.  When an instrument acts in this manner, each write of a command must be followed by a read in order to clear the buffer.  Most instruments do not respond to commands and will only respond to a query.
  5. For the responses from this instrument:
    • Search the string for the ">OK" or "> OK" response to determine if the command was accepted by the instrument.  (Not sure from the image if there is a space after the > symbol).
      • If found, command has been accepted by the instrument.
      • If not found, instrument has not accepted command "as is" and may be incorrect or requires more information/parameters.
    • Strip the repeated command (including the return character) from the response string:
      • Now extract that leaves the actual response along with the OK line.
      • Discard everything from the return character onward (This eliminates the OK line).  Now only the actual response from the instrument exists.
      • Extract information as required dependent on the Menu Ring Selection.
  6. Typically, it is not a good idea to use the Bytes at Port primitive; however, based on how your instrument responds, it is probably better than three consecutive reads followed by an asynchronous read for the final character(s).
  7. Sometimes it is better to place the Input Connection parameters for the VISA Configure Serial Port within a Control Cluster then use the Unbundle by Name primitive to connect those parameters.  As this is for a single instrument, it is fine.
Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 48 of 54
(331 Views)

CAN YOU PLEASE WRITE ONE PROGRAMME TO SHOW HOW TO STRIP THE REPEATED COMMAND (INCLUDING THE RETURN CHARACTER) FROM THE RESPONSE STRING. 

0 Kudos
Message 49 of 54
(278 Views)

This is so basic.  We are stripping characters from a string.

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 50 of 54
(271 Views)