07-09-2014 06:06 PM
@Zac58 wrote:
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?
Yes, exactly.
Zac58 wrote:
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.
There's a folder in the Alicat folder called "ExamplesLowLevelVIUsage" - is that the "low level" VIs to which you're referring? Other than that, there's just the VISA serial functions that you already found. The Alicat VIs are built on top of those.
Zac58 wrote:
3) Would anyone have LabVIEW 8.6 compatible programs for the Alicat or possible places to look?
I've attached a ZIP of the entire driver set from the Alicat web site, saved back to version 8.6.
07-10-2014 09:30 AM
nathand,
Thank you for the quick response and the program files! This is exactly what I needed. I tried the AlicatSetPoint.vi and it worked but I don't understand how.
(A=UnitID)
How did "\r\rA64000\r" in the VISA-write translate to the Alicat when the programming manual doesn't use this syntax? Also, what is this syntax called and where could I find other commands? I am fairly new to programming.
Thank you again, you have been extremely helpful!
-Zac
07-10-2014 09:41 AM
The string is displaying \codes. A mix of readable characters and control codes \r is the code for carriage return which would not be easily visible to you in normal display. You could also have hex display which shows the 2-digit hex code for each byte. The disadvantage with that is the human readable stuff, A64000 would not be easily readable to you.
One mistake new LabVIEW users might make is to use codes like \r when the string is in normal display. In that situation, you re not sending a carriage return but an actual backslash followed by an "r".
07-10-2014 10:10 AM
Wow, I never would have considered that. For the string constant in question, it was in "\ Codes Display". So, theoretically could I use the Alicat-specific code in my Labview-strings (in normal display) to VISA-read and VISA-write VI's or does that not translate correctly?
Also, browsing through the labview programs specific for the Aicat I noticed that to intialize the Alicat, it is required to send carriage return twice to make the Alicat listen? How would I ever know to do that!?
07-10-2014 10:31 AM
It doesn't matter what display mode the string control or constant is in. It will send the same data. The display mode is to allow you to more easily see or enter different types of data as the programmer. Control codes don't show up well or at all to a user in normal display because they don't have a visible character associated with them. In \codes display, things like a carriage return show up as \r. Line fee \n. Tab \t. Other codes such as STX would show up as \02. In hex display, all the bytes will show up as the hexadecimal representation.
I imagine the double carriage return shows up somewhere in Alicat's communication manual. It is probably just hard to find. Or maybe they forgot to include that information. I don't know because I don't have their manual.
07-10-2014 11:47 AM
There's a link to the manuals in one of my earlier posts. In that post, I quoted from the manual where it explains what's being sent here. About the double carriage return: "If they do not, try hitting 'Enter' a couple of times and repeating your command." Since there's no harm in sending a couple of extra carriage returns (hitting enter a couple of times), it looks like the LabVIEW code just does that preemptively. The manual may use different syntax to describe the commands (for example carriage return instead of \r) but it does describe exactly what the code is doing.
07-10-2014 12:07 PM - edited 07-10-2014 12:09 PM
Gentlemen,
Thanks very much for your help Nathand, and good speaking with you this morning Zach! Alicat is about to release a brand new all inclusive VI, which provides a very nice dashboard for all possible functionality you could require with any Alicat products via Labview.
Onboard setpoint control, fully customizable data graphing, PID adjustment, 16 bit register reading and writing, as well as a real time monitor of data rates, are just some of the things in the new, much more user friendly VI. Also, the new VI will be available in Labview formats from 8.0 to current.
Definitely want to extend a big thanks to the community in general, and our Alicat end users with their help with the drivers over the years (Especially David Boyd at Respironics!) your input has made the new improved version possible!
The new VI's will be in Beta testing next week and uploaded here and on the Alicat Drivers page very soon!
Jesse Arenstein
Lead Sales Engineer
Alicat Scientific, Inc.
7641 N. Business Park Drive
Tucson, AZ 85743 USA
Phone (520) 290-6060
Cell (520) 275-8004
FAX (520) 290-0109
07-10-2014 02:16 PM
Jesse,
Thanks for the mention!
Zach - one of the features of VISA is the ability to specify, at one point in your code, for a given VISA session, a termination character to be automatically appended on VISA Write, and/or trigger an end-of-read condition on VISA Read. This is what I do within the LabVIEW driver code I wrote for the Alicat (and best practice for just about any instrument code for a device which uses a typical termination sequence, 99+% of which use \r, \n, or allow a combination).
So none of my individual driver routines for all those Alicat commands do any kind of explicit append of the carriage return. Whenever I call the 'Initialize' routine, I set all that up, like so (note that the node requires the carriage return by its numeric value, which I show as hex). I also send out four lines that are a single space character followed by the CR, just to implement that startup note from Alicat - and I forget why I added the space:
Hope this helps-
Dave
07-28-2014 07:18 PM
Hello All,
Here are some Google Doc links to the newest (although still Beta) version of the Alicat Drivers:
https://drive.google.com/file/d/0B2TY6wCQeJtIbnlsenhBSDk5QlU/edit?usp=sharing
https://drive.google.com/file/d/0B2TY6wCQeJtITi04bW1RRlU2bkE/edit?usp=sharing
Jesse Arenstein
Lead Sales Engineer
Alicat Scientific, Inc.
7641 N. Business Park Drive
Tucson, AZ 85743 USA
Phone (520) 290-6060
Cell (520) 275-8004
FAX (520) 290-0109