03-06-2024 02:21 AM - edited 03-06-2024 02:27 AM
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.
03-06-2024 02:27 AM - edited 03-06-2024 02:40 AM
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.
03-06-2024 09:14 AM
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.
03-06-2024 10:11 AM
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.
03-07-2024 08:56 AM
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
03-07-2024 03:10 PM
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.
03-07-2024 03:33 PM
Have you tried asking the manufacturer if they have drivers for LabVIEW so you can save time in developing and debugging the driver?
03-07-2024 05:44 PM
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.
03-08-2024 01:11 AM
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
03-08-2024 01:17 AM
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.
And LOG FILE OF RESPONSE I GOT FROM Terminal software.
Please help me making the LabVIEW software.