LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Re: LabVIEW driver for Advanced Energy Cesar 0210 RF generator

I am using AX5000 AURORA SERIES RF Generator. I want to control my device using serial commands. 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 input from this connector when the generator ‘Settings’ are set to ‘Serial’. Serial Commands - All serial commands must be terminated with an "ENTER" key. This key is the ASCII character code for Carriage Return. It is a decimal value "13", or and 8-bit value of "00001101". I am attaching the serial command list. All the serial command are terminated with enter key. No serial command (SCPI) is terminated by question mark as you see the screenshot of command list. Please help me in making VI in LabVIEW for control and statue command.

Also please tell me the operation sequence of the command which are useful for my operations. 

0 Kudos
Message 1 of 21
(576 Views)

While we do not develop instrument drivers for users on demand, we can help with specific problems that you encounter. It's however quite unhelpful to attach images of VIs, much better is to attach the actual VIs and if you are using a very recent version of LabVIEW, to save them first for an older version "Save for previous", as not everybody always upgrades to the "latest and greatest" for a number of reason. LabVIEW 2019 or 2020 is usually a good version to save to, earlier is of course also possible.

 

Your minimal instrument communication VI, whose image you attached, is really extremely minimal and assumes that all query commands have a question mark appended, which of course applies to SCPI conformant devices, but there is no instrument driver police which enforces that instrument manufacturers use that convention. 😁

A real instrument driver, even if it does not need to be as fully fledged as an official NI instrument driver, implements one VI per operation so that the user (which is you even if you wrote the driver yourself) doesn't have to refer to the instrument driver command description each time when using that "driver". In such a way you can implement the query of a return value in the according VI when needed, and don't have an ubiquitous VI that tries to be an instrument driver for every possible operation of every possible instrument, with lots of device dependent conditional code. When programming you want to be modular, with one function per operation, not have one function doing zillion different things.

 

From the description it sounds like it is a very standard serial communication instrument, which is easily done in LabVIEW with NI VISA. You just need to observe a few things when writing your instrument driver and this video is an indispensable resource that points out pretty much all the important aspects that you should be aware about: VIWeek 2020/Proper way to communicate over serial.

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 21
(571 Views)

when I am sending VER to device with the programme i have been attached below. 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 change 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 3 of 21
(510 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 4 of 21
(510 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.

I am attaching screenshot of the command sent and response i got.

For few command i am getting NAK.

 

Thanks

Prashant Kumar

0 Kudos
Message 5 of 21
(486 Views)

We still do not develop drivers for forum users. 😁

Why your device answers with NAK on some commands I have no idea. That you have to take up with the manufacturer.

According to the documentation you should append a byte 13 which is <carriage return>. You currently use the LabVIEW end of line constant which under Windows will append character 13 and 10, or <carriage return> and <line feed>. Depending how lenient your device command interpreter is, this could be a problem for it or not.

Also it seems that some commands can return more than one line of text. So after sending your command, you should actually loop reading line for line until you get a line that contains OK or NAK.

Rolf Kalbermatter
My Blog
0 Kudos
Message 6 of 21
(470 Views)

Have you tried asking the manufacturer if they have drivers for LabVIEW so you can save time in developing and debugging the driver?

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 7 of 21
(457 Views)

1.According to the TERMINAL_CAPTURE.jpg, the correct baud rate setting is 9600,n,8,1

2.If all the response is only one line with CR, you can enable the Termination Char and set the read count as many as possible.

3.If the response could be more than one line, maybe try to disable the Termination Char and use bytes at port and put a wait before the read.

4.A NAK response indicates an error in the command, maybe the command needs to add an extra parameter.

0 Kudos
Message 8 of 21
(448 Views)

yes sir

I have No idea why device is responding NAK. I think I have to change terminated all the command with CR. Now next task is to categorize few queries command, write command in a group and send using LabVIEW VISA driver. i want tab based control to send all the category of command.

1. Initialize Tab

2. Serial setting Tab

3. Freq Information Tab

3. Main Display/Operation

4. Metering inf.

Matching Inf.

Thanks

Prashant Kumar

 

0 Kudos
Message 9 of 21
(434 Views)

Thankyou sir for your reply.

I discussed with Vendor. They don't have LabVIEW driver for this. I want to make visa serial based LabVIEW programme using Tab based control.

I have to send total 28 command and broadly categorize my command list into 6 group. and i willsend command from each group seperately. using Tab based control.

1. Initialize Tab

2. Serial setting Tab

3.Frequency Information

4. Main display of opertaion

5.Metering Information.

6. Matching Information.

i am attaching list of commands also.

  1. AFA -- <VALUE>--Changes the Maximum Frequency
  2. AFF -- <VALUE>--Changes the current RF Frequency
  3. AFI -- <VALUE>--Changes the Minimum Frequency
  4. AFS -- <VALUE>--Changes the Strike Frequency
  5. ALM                        Returns Alarm Status.
  6. CMP <VALUE>Returns Customer Maximum Power.
  7. CMR <0, 1, 2><0, 1, and 2 >Changes the RF Control Source. 0=Local, 1=Remote, 2-Serial
  8. CMS <0, 1, 2><0, 1, and 2 >Changes the Set point Source. 0=Local, 1=Remote, 2=Serial
  9. FOR Returns the Forward Power. - returns continuously
  10. FRE Fault Reset.
  11. GFI Returns all stored frequency information
  12. GMI Returns all current Metering data
  13. GRF Returns all relevant RF information
  14. PAI Returns the PA currents (- returns continuously)
  15. PAV Returns the current DC Voltage (- returns continuously)
  16. PWR Returns Forward. Reflected, Gamma, and SWR
  17. REF Returns the Reflected Power. <- continuously>
  18. RF+ Turns RF On
  19. RF- Turns RF Off
  20. RFT Returns how long RF has been on.
  21. RPS Returns Status/Mode of the Generator.
  22. RSC <0,1,2><0, 1, and 2 >RS-232/RS-485. <0=RS-232, 1=RS-485 (4-wire), 2=RS-485 (2-wire) RSE Returns the Setpoint (- returns continously). RSR Status Bus. Provides a decimal value containing many of the active settings on the generator SBD ><0,1,2,3,4, 5,6,7,8,9>Changes the serial COM baud rate based on pre-set values.
  23. RSE Returns the Set point (- returns continuously).
  24. RSR Status Bus. Provides a decimal value containing many of the active settings on the generator
  25. SBD <0,1,2,3,4, 5,6,7,8,9><0, 1,2,3,4,5,6,7,8,9 >Changes the serial COM baud rate based on preset values.
  26. SET <VALUE>--Changes the Set point.
  27. STP Stops Continuous Data Return
  28. VER Returns the Version of the Generator

And LOG FILE OF RESPONSE I GOT FROM Terminal software.

Please help me making the LabVIEW software.

 

0 Kudos
Message 10 of 21
(432 Views)