02-10-2024 08:43 AM
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.
02-10-2024 10:28 AM
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
02-11-2024 09:09 AM
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.
02-11-2024 02:36 PM
02-12-2024 08:43 AM
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.
02-12-2024 09:25 AM
It looks like an error handling Issue; possibly due to your input string. See if this helps.
02-27-2024 09:08 AM
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
02-27-2024 12:46 PM - edited 02-27-2024 01:02 PM
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.
02-28-2024 02:39 AM
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..
02-29-2024 02:54 AM
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.