Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Sorensen/Ametek XG series USB LabView Control

 more thing is that I have tried with TCP open read write and close library in LabVIEW. But there is error 56 coming when I given constant value of 1024 at Bytes at port in TCP read. I am sharing my code. Please help me.

0 Kudos
Message 21 of 54
(896 Views)

64 bit LabVIEW is installed in program files, and if you have that you should keep it in the previous folder.

32 bit LabVIEW uses the C:\Program Files (x86)\National Instruments\LabVIEW 2021\instr.lib\

 

You can see which version you are using by going to "help/about LabVIEW"

Help is at the right of the top cmd menu

About is the one on the bottom when clicking help

greetings from the Netherlands
0 Kudos
Message 22 of 54
(883 Views)

one more thing is that I have tried with TCP open read write and close library in LabVIEW. But there is error 56 coming when I have given constant value of 1024 at Bytes at port in TCP read. I am sharing my code. Can you please help me. 

0 Kudos
Message 23 of 54
(867 Views)

Did you try to ping your instrument in a cmd window?

greetings from the Netherlands
0 Kudos
Message 24 of 54
(848 Views)

yes i tried to ping and its working fine.

I have sent *idn? command through vi using TCP open, write, read, close.

I have got response of *idn?

But one error is coming in error out. 

I am attaching screenshot of that error out.

Also i am attaching my code.

Please help me.

Download All
0 Kudos
Message 25 of 54
(833 Views)

It looks like an error handling Issue; possibly due to your input string.  See if this helps.

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

SOLUTION.

It really solved my problem.

Now i have tested my sorenson Amtek power supply by sending scpi command sequentially i.e. one by one.

Now i want to send Multiple scpi at once in a sequence

1st  Deveice Identification

2nd Error identification

3rd Set current and voltage using write SCPI command

4th read set value of current and voltage using write and read scpi command

5th Using boolean control switch to ON/OFF Output

6th Using boolean control switch to start and stop measuement of current, voltage and power.

So these are my requirements and based on my requirements i have made sub vi for each operation and connected all subvi sequentially in a single vi but only first subvi is working and rest of the subvi is not working.

Is it a time delay problem or something else.

Cn you detect error in my programme. kindly suggest better way of doing this.

I am attaching all my programme.

 

Thanks

Prashant Kumar

0 Kudos
Message 27 of 54
(750 Views)

You are making things too complicated.  Each vi closes the port, but does not open the port.  That is the reason only the first vi works.  

 

I am attaching a vi based upon VISA control.  Swap out the VISA controls with the similar TCP ones to get your needs. It allows for any number of commands to be sent to the instrument.  Multiple commands can be sent on a single line by inserting a semi-colon (";") between them [3rd element in array].  The supply will interpret that (";") as a separator between commands.  Only place a single query per line as the program will only obtain the first response waiting in the queue. 

 

This Vi will return a space when not expecting a communication response from the equipment (Supply) in order to keep the arrays visually aligned.

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

Your programme idea is very good.

I have replaced visa by corresponding TCP connection. What is the concept of shift register and do i need to change the index of 1 D array to send subsequent command OR programme itself will send all the query and write command one by one.

Please help me that how these string array and shift register works.

I am trying to check the VISA by TCP in your sample command.

I will check and reply to you soon..

 

0 Kudos
Message 29 of 54
(723 Views)

Hello

A shift register is a kind of local variable in a loop. What is put into a shift register is available in the next loop. Very handy feature.

A special feature is an uninitialized shift register. You can search for "uninitialized shift register in LabVIEW" with google.

You will land on a LabVIEW wiki page. With much more info.

greetings from the Netherlands
0 Kudos
Message 30 of 54
(693 Views)