LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Alicat send command

Solved!
Go to solution

Hi,

I am using a simple Alicat send command vi to control an Alicat mass flow controller using Labview.

I downloaded the driver directly from the Alicat website. link:

 

http://www.alicat.com/support/download-device-drivers/

 

The problem is that I keep getting garbage responses from Alicat no matter what command I enter.

The response is in terms of characters that cant even be copied and pasted.

I have included a print screen image of the vi in this post. I would really appreciate it someone

could let me know what commands I should enter or if these errors are to be expected. I am pretty new to

the labview environment and have been stuck on this issue for weeks. Thanks.

 

 

0 Kudos
Message 1 of 19
(5,873 Views)

It looks like you received binary data.

 

What kind of response do you expect to receive?  Look at the programming manual for the device.

Message 2 of 19
(5,856 Views)

I have looked at the device manual and it doesnt contain the characters that are being displayed.

I tried to simplify it a bit and am now using just a read serial buffer vi.

I have attached the results that I am getting to this post.

The results are also somewhat different than the ones I was getting before as they actually have ascii characters.

Any input would be appreciated as I have no idea how to proceed. There cant be a problem with the code because it is pretty straight forward

the flow controllers are also working well as I used them just yesterday. 

0 Kudos
Message 3 of 19
(5,828 Views)

This is could be a problem with the setup of your serial port protocol. The default Alicat setup is 19200,n,8,1. If you look at the low level example directory some of the vi's may give you and idea how the Alicat vi's work together. There is also a read parsing vi that takes the string from the Alicat and converts it into values. It appears that some Alicats return values in binary mode and others in ASCII. You will need to check the manual for your particular model in order to find out which parsing vi you need to use.

Buddy Haun
Certified Trainer, Former Alliance Member, LabVIEW Champion
Message 4 of 19
(5,814 Views)

@sssk9797 wrote:

The results are also somewhat different than the ones I was getting before as they actually have ascii characters.


It looks like you changed the display mode of the string indicator to "\ codes display" which is why you're seeing actual ASCII characters now. That's not a change in the data, just the way you're displaying it. You can change the display mode by right-clicking on the indicator.

Message 5 of 19
(5,810 Views)
I have been working on this project almost exclusively but have yet to understand what the problem is. I have read some other posts but would like to know if there is a simple alicat command that I could send to the mass flow controller. If that doesn't work I have decided to look at the serial port connections to ensure that they aren't causing the problem even though I think if there was a problem with the connections there would be no data transfer at all.

In response to the post above me, the data was intact the same garbage as before but was being displayed as
" \ codes display".
0 Kudos
Message 6 of 19
(5,767 Views)

Which VI are you running? If you are only running "AlicatSendCommand" then you are probably never initializing the serial port properly. Did you look through the examples, as a previous post suggested? It looks like AlicatSendCommand should not be run as a top-level VI.

 

Within the same VI, you should call AlicatInit, then AlicatSendCommand. Have you tried one of the examples, such as _AlicatRead2010, that demonstrates this?

0 Kudos
Message 7 of 19
(5,738 Views)

I tried the process mentioned in the post above but was still getting weird binary symbols which is why i decided to try some hardware changes.

I used the cables that came with the flow controllers that were already set up in my  lab and was able to read the front panel of the flow controller very easily.

Really frustrating to find out that the problem was as minor as simply changing the cables. 

 

My task now is to be able to control the flow controller and I would like to know what the Set Point value is. The Alicat Write vi gives the option of changing the set point value and mentions that 64000 is full scale for the controller. Is this the flow controller value? if so why is it in this form? shouldnt it be in the 100's?

 

Again, Thanks for all the replies above. 

0 Kudos
Message 8 of 19
(5,717 Views)
Solution
Accepted by topic author sssk9797

Please read the manual for your mass flow meter. I'm assuming you have an MC series. The manual explains:

Sending a Set-point via RS-232 / RS-485:

To send a set-point via RS-232 / RS-485, “Serial” must be selected under the “Input” list in the control set up mode. To give controllers a set-point, or change an existing point, simply type in a number between 0 and 65535 (2% over range), where 64000 denotes full-scale flow rate, and hit “Enter”.
The set-point column and flow rates should change accordingly. If they do not, try hitting “Enter” a couple of times and repeating your command. The formula for performing a linear interpolation is as follows:
Value = (Desired Set-point X 64000) / Full Scale Flow Range
For example, if your device is a 100 SLPM full-scale unit and you wish to apply a set-point of 35 SLPM you would enter the following value:
22400 = (35 SLPM X 64000) / 100 SLPM

Message 9 of 19
(5,715 Views)

Buddy Huan,

 

I am trying to initialize my Alicat PCD pressure regulator with LabVIEW so I can read and write set points and pressures. I have Labview 8.6 and cannot use the offered downloads from the Alicat website. I have three questions.

 

1) The Alicat programming manual shows <CR> after every command. This works in HyperTerminal but what is the equivalent in LabVIEW? Concatenating a Carriage Return Constant to a string with the command code?

 

2) How do I find the "low level" programs in LabVIEW? I have looked in NI Example finder but can only find Serial Read and Writes and cannot use them correctly because I do not know how to correctly enter commands for the Alicat using LabVIEW.

 

3) Would anyone have LabVIEW 8.6 compatible programs for the Alicat or possible places to look?

 

Thank you for reading this, any help would be appreciated!

-Zac

0 Kudos
Message 10 of 19
(5,487 Views)