10-08-2018 03:57 AM
Hi Community,
I Have a problem when i try communicating between Labview & Rigol power supply.
Find the attached code. The command for applying voltage is :APPL X, where X is voltage to be applied. when i give this command directly the supply will respond.
Since i need to vary this voltage, hence i am using concatenating operation so that i can vary the 3rd element in concatenate block.
But the code with concatenate is neither giving any error nor output is reflecting on the power supply.
Open stage wise input program. Help me out.
Solved! Go to Solution.
10-08-2018 09:07 AM - edited 10-08-2018 09:08 AM
Hi suma,
what about appending a LF char as is done in your "Command" control?
(Enable the display style indicator for that string control and switch it to "\-Codes"-displaymode!)
I guess this comment is also given in the (programming) manual of your device…
10-08-2018
10:40 AM
- last edited on
07-14-2025
12:06 PM
by
Content Cleaner
I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours
Your code is inside out. You shouldn't have a while loop in the subVI, because you can't stop if from the main VI if it starts running and you have a False wired into that close input.
You should initialize your serial port before your Main VI's while loop, communicate inside, and close it after the while loop.
Note that using bytes at port is the wrong thing to use 99% of the time. If your device sends a termination character, then rely on that to stop the VISA read when you read a large number of bytes.
Your subVI's connector panel is mixed up. You should have inputs (controls) to the left terminals, and outputs (indicators) connected to the right side terminals. A universally accept LabVIEW style has Error In terminal to the lower left and Error Out to the lower right.
10-09-2018 03:29 AM
Now I enabled the \code display. Now my command is looking like :APPL\s3 instead of :APPL 3.
What should i do to get :APPL 3 command.
10-09-2018 03:58 AM
Hi suma,
Now my command is looking like :APPL\s3 instead of :APPL 3.
Your command should look like ":APPL\s3\n"!
Did you read the manual of your device?
Did you read the paragraph which explain the proper TermChar usage to initiate commands?
10-09-2018 04:24 AM
Attached is the manual of my device.
They have not mentioned all these.
But now its working with this ":APPL\s3\n"!
Thank you.
10-09-2018 04:30 AM
10-09-2018
11:47 AM
- last edited on
07-14-2025
12:06 PM
by
Content Cleaner
@suma_n wrote:
Attached is the manual of my device.
They have not mentioned all these.
But now its working with this ":APPL\s3\n"!
Thank you.
I believe you do not understand what the Backslash ('\') Codes Display actually is. Here is a link to the online help for this feature:
Backslash ('\') Codes Display.
Upon reading this, you should be able to understand that the manual was mentioning it all along.