Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

A problem in reading datas seperately with the alicat MFC device in

Hi everyone. I have a question about Alicat MFC device. I have two Alicat device. There is the original block diagram of MFC. It is written with the ring for different devices to get their datas but I need those seperately. So I have to change the ring and add each device separately to see the datas at the same time and collect them simultaneously. There are snippets to see how the code is written. I tried every way but it didn't work properly. For one example, it gives same data, on of them gives error in reading com port etc. Please help. 

here what I changedhere what I changed Original Alicat Device's VIOriginal Alicat Device's VIThe whole VI that I madeThe whole VI that I made 

0 Kudos
Message 1 of 30
(4,514 Views)

Sheriff, 

 

What do you mean by "It is written with the ring for different devices to get their datas but I need those seperately."

 

This is a lot of code and not a clear question. I can guarantee you will get a better response with a better scoped question. Specs on the device, specifics on what you need and why you're failing, some more work done on your end to narrow down the problem, providing the actual code rather than just picturesm etc... We are here to help, but there isn't much here to work off of!

 

Best,

Clint T.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 30
(4,476 Views)

 Hi ClintT;

Thanks for replying. Sorry for inconvenience. Now, I have 2 mass flow controller device(MFC). Each o them reads the pressure,temperature, mass flow, set point, etc. As it is shown in the 'Original Alicat Device's VI' snippet, there is a 'ring constant ' for active device that if we want to see the other device, we change it 1st to 2nd.We can easily make a ring constant from the numeric palette in block diagram. But there is a problem. If I want to see both device seperately at the same time,(I see one of these devices while I see the other device), I can't because there is a ring constant, and each datas from the each device is keeping in the for loop inside the true/false case. Acquire each device in  a for loop and iterate all sets of data,because of the 'ring constant', only displays the selected one as shown in the below picture. I dont want to to 'ring constant',I want to see both two device in the same front panel. snip.pngIt should be the only one comport initialization for both device but I want to see the device's datas individually at the front panel as  in the picture shown below.snpp.png

My all VI's is in here so every one can easily study on them. That is the main problem. 

Secondly, I want to write obtained datas from the each device to XY Graph and collect them into an excel file. But first, I have to solve the main problem. I hope, I've been explained clear enough. If there is a still misunderstood part, pleaase reply again. I have attached the VI's. Simplified Example_Multiple devices with setpoint v1.6 is the main VI and I redesign it for my purpose and add it as a  Alicat In-Situ v1.1.Sincerely.

 

 

 

0 Kudos
Message 3 of 30
(4,450 Views)

 Hi ClintT;

Thanks for replying. Sorry for inconvenience. Now, I have 2 mass flow controller device(MFC). Each o them reads the pressure,temperature, mass flow, set point, etc. As it is shown in the 'Original Alicat Device's VI' snippet, there is a 'ring constant ' for active device that if we want to see the other device, we change it 1st to 2nd.We can easily make a ring constant from the numeric palette in block diagram. But there is a problem. If I want to see both device seperately at the same time,(I see one of these devices while I see the other device), I can't because there is a ring constant, and each datas from the each device is keeping in the for loop inside the true/false case. Acquire each device in  a for loop and iterate all sets of data,because of the 'ring constant', only displays the selected one as shown in the below picture. I dont want to to 'ring constant',I want to see both two device in the same front panel. snip.pngIt should be the only one comport initialization for both device but I want to see the device's datas individually at the front panel as  in the picture shown below.snpp.png

My all VI's is in here so every one can easily study on them. That is the main problem. 

Secondly, I want to write obtained datas from the each device to XY Graph and collect them into an excel file. But first, I have to solve the main problem. I hope, I've been explained clear enough. If there is a still misunderstood part, pleaase reply again. I have attached the VI's. Simplified Example_Multiple devices with setpoint v1.6 is the main VI and I redesign it for my purpose and add it as a  Alicat In-Situ v1.1.Sincerely

 

 

 

0 Kudos
Message 4 of 30
(4,446 Views)

 Hi ClintT;

Thanks for replying. Sorry for inconvenience. Now, I have 2 mass flow controller device(MFC). Each o them reads the pressure,temperature, mass flow, set point, etc. As it is shown in the 'Original Alicat Device's VI' snippet, there is a 'ring constant ' for active device that if we want to see the other device while we are processing, we change it 1st to 2nd but we cannot see each of them at the same time.We can easily make a ring constant from the numeric palette in block diagram. But there is a problem. If I want to see both device seperately at the same time,(I see one of these devices while I see the other device), I can't because there is a ring constant, and each datas from the each device is keeping in the for loop inside the true/false case. Acquire each device in  a for loop and iterate all sets of data,because of the 'ring constant', only displays the selected one as shown in the below picture. I dont want to to 'ring constant',I want to see both two device in the same front panel. snip.pngIt should be the only one comport initialization for both device but I want to see the device's datas individually at the front panel as  in the picture shown below.snpp.png

My all VI's is in here so every one can easily study on them. That is the main problem. 

Secondly, I want to write obtained datas from the each device to XY Graph and collect them into an excel file. But first, I have to solve the main problem. I hope, I've been explained clear enough. If there is a still misunderstood part, pleaase reply again. I have attached the VI's. Simplified Example_Multiple devices with setpoint v1.6 is the main VI and I redesign it for my purpose and add it as a  Alicat In-Situ v1.1.Sincerely

 

 

 

0 Kudos
Message 5 of 30
(4,447 Views)

Sheriff, 

 

What is the setup of this instrument? What do you mean by, "It should be the only one comport initialization for both device?" Do you have two devices on the same com port? If so, how? Are there multiple sensors you are trying to read from on one device? Is this a known limitation of the device you are working with? Have you reached out to AliCat for info on how their VIs were built?  

 

Looking at the VIs you included, there are a lot of missing VIs that I would assume were built by AliCat and are likely doing some of the specific communication. I'm not sure the specifics of the device and the serial communication you are trying to accomplish. If you can provide some clarification on how you are communicating with this device then I may be able to provide some guidance! 

 

Regards, 

Clint T.
Applications Engineer
National Instruments
0 Kudos
Message 6 of 30
(4,438 Views)

Yes, I have two devices on the same com port. The VI gets the device's ID. It goes from A to Z. It is setted to run 26 times for once per letter because there 26 letter.So in my case, I have only A and B IDs for two device. The program can collects all device's datas in memory when we start the program. We can easily see them from the changing its ID's letter to another with the help of ring. First you initialize the comport, and the VI starts to collecting datas as shown in the rtyt.png . You can easily find and study on the library of Alicat Device's VI's from this link;

https://www.alicat.com/support/software-drivers/labview-virtual-instrument-drivers/

You can also download it only clicking on the zip file ;

  • LabVIEW 2010-compatible Driver Library for Alicat Instruments (v2) Zip file (6.8 MB), includes integrated drivers (.vi) section. I cannot upload each VI's because there is bunc of VI's.
  • After download it, open the  example programs and go to the 'Alicat Simplified Driver Example_Multiple Devices with Setpoint' file. There is VI that you can easily solve the structure. Only I want is to stick out the device ID's from the 'ring' and see them in a seperated way. I mean I want A and B device's datas at the same time. 
  • If there is an inconvenience, please reply me. And I studying on it for weeks but I cannot solve it.I really need a help. If it is solved, I will be appreciated.
0 Kudos
Message 7 of 30
(4,434 Views)

Sheriff, 

 

I still don't quite understand. Explain this to me as if I have never seen the system Smiley Wink

 

Is there one wire from a USB/com port that goes into one device? Are you using a hub to have two devices into one port? Do specific commands on this instrument access different sensors? Is the hardware made to operate how you are trying to use it? 

 

Cheers

Clint T.
Applications Engineer
National Instruments
0 Kudos
Message 8 of 30
(4,404 Views)

@happinesss wrote:
Only I want is to stick out the device ID's from the 'ring' and see them in a seperated way. I mean I want A and B device's datas at the same time. 

Hi Sheriffff,

 

Sorry for the delay, I generally like to check the forums for posts on Alicat devices at least once a week. My name is Kevin, and I am a test engineer at Alicat (and currently the primary person who updates the LabVIEW code for our Alicat devices). I believe you are requesting to view both device "A" and "B" on the front panel at the same time rather than only displaying the one present in the drop-down menu ring, is that correct. If so, then the easiest way I can think of while using the driver example as a starting point would be to still make use of the auto-indexing for loops to query data from all devices, but to simply index the desired data directly out of them (an array of data where index 0 is "A" and index 1 is "B"). The data is indeed present, but only displayed based on the whether the index matches that of the selected item from the ring control.

 

See attached VI for a quick modification I made to achieve this:

Alicat VI modification.PNGAlicat VI modification_FP.PNG

Removing the ring control and going to a static array of just "A" and "B" simplifies things. I also added a quick "Start Program" button that will prevent the VI from initializing the COM port until the button is clicked, just as a small quality of life improvement.

 

As for generating graphs or charts from this, you should be able to take the VI attached and simply use the "unbundle by name" to take any desired piece of data and push it to a graph or waveform chart.

 

Please let me know if you have any questions, and I will be happy to assist.

Kevin Gudenkauf
Test Engineer
kevin@alicat.com
7641 N. Business Park Drive
Tucson, AZ 85743 USA
Phone (520) 290-6060
www.alicat.com
0 Kudos
Message 9 of 30
(4,367 Views)

Hi Kevin,

Thanks for replying. Almost I lost my hope. Actually I thought to seperate them with an array but I couldn't manage as you see. Yeah, that is what I want. But for more, as you adviced me to unbundle by name for generating graphs or charts from this, I did like that in attached VI. But I think there is an easy way to collect them and generate the graph from these datas. I put a png file. I will change my VI with your attached VI and I will make it as I did before like in the figure. I will put them in an 'insert into array' for keep each data and make them shift register to add news into the previous one and take them to put into xy graph with case structure to see unbundled datas. Is there any easy way ? I did like that (insert into array) because I want to extract the datas to excel file with the elapsed time, so the other problem is this. I did 'write to spread sheet or write to measurement file ' but again it didn't worked. 

Best regards.The whole VI that I made

0 Kudos
Message 10 of 30
(4,360 Views)