04-08-2022 03:29 AM
Hello,
I control a CVC3000 pump controller, with the RS232 protocol, I use VISA to send the set of commands. instruments responds well I still have a problem, that I send a list of instructions to execute, the Read VISA function, reads all the responses to the instructions, this causes me a problem in the display, I want to display only the pressure value on my indicator and not th sequence of responses to the various commands.
So my question is how can I display the measurement instruction and not the rest with Read VISA?
I explain I want to send for example this list of these command
OUT_MODE 2 return 2 in Read VISA and I'm not interested in that
IN_PV_S1 returns the value of my measurements and that what I want to display only on my indicator
Is it possible to exécute all these instructions and select which one I want to read and display at the same time otherwise I let you clarify the solution I put you my program attached thank you to all ? how i can do this
2-I have a second problem, my response to the instructions is a little slow, sometimes to send a pressure setpoint it takes the instrument about 4s to display the new value on its screen, and this means that I have to put a wait of (100ms exp) between writing and reading, as in the manufacturer's manual, I don't understand how to adapt this wait of 100ms between two successive instructions?
someone can give me an example I would be very grateful
Translated with www.DeepL.com/Translator (free version)
Solved! Go to Solution.
04-08-2022 09:52 AM - edited 04-08-2022 09:54 AM
I would put the commands in a case such that when you write a command your response can be captured and parsed appropriately. Also you can use a wait ms after each command to comply with the required timing.
Note this code is an example of what you can do, it might not run as shown, it only conveys an idea.
04-11-2022 02:30 AM - edited 04-11-2022 02:31 AM
thank you for taking the time to answer me, it seems to me that you did not understand my question well, I want to execute this set of commands and return that the reading of the command IN_PV_S1?
here in this case the problem is always the, Read VISA returns on the display (2 after the pressure and 0), and I want to have as reading on my indicator that the value of the pressure associated to Read VISA of the command IN_PV_S1, I hope I was clear as well
04-11-2022 02:39 AM
Hi ayoubas,
you send all commands at once to your device, so I see two options:
1. What is the response string? Do you receive all responses at once? If so you"just" need to parse correctly...
2. Send the commands one after the other using a loop. Store/handle the responses as required!
04-11-2022 02:56 AM
the chain of response is :
the answers of the commands but not at the same time are separated by a very short time, for example:
2
360 mbar
0
I send this command at the same time.
Is it possible to return the answer only from the pressure associated to the command IN_PV_S1?
Can you illustrate me with an example?
04-11-2022 10:44 AM
I agree that I don't understand what you are trying to do but it sounds like you send one command and get back three separate responses. One way to handle this (if you know the size of the response in bytes ) is like this:
04-15-2022 08:11 AM
the solution that I made, it is exploited the existence of a string of characters that characterizes my answer wishes as all the measures have mbar and that the other answers that I do not want does not contain therefore with the function search once that it contains I display it in true and here is
thank you all for the effort.
04-29-2022 02:30 AM
Hello,
My instrument responds to the instructions for a long time, it's a vacuum regulator, so is it normal to have a display shift on the instrument and labVIEW are not synchronized?
I would like to know where the problem is, is it that the instrument is doing its job which is the regulation and can't do both at the same time, or do I have to put a wait in the program of a few ms?
I saw on the datasheet that it is necessary to put 100ms between two successive instructions! but is it for the time to send on Write VISA, or for the reading.
I put you my program and I hope that somebody can help me thank you