Back to Top
 
 
 
 
 
 

Textual Languages

CAT-Solutions can provide custom solutions using programming languages like C, C# (C-sharp), Visual Basic or LabWindows/CVI.

The MS Visual Studio platform is used for C# and VB.
The Labwindows/CVI platform is used for application development in ansi C.

Sometimes special Glue languages like Perl are needed to interconnect different applications.

C# and .NET

  

The C# Language.

C# is an elegant and type-safe object-oriented language that enables developers to build a variety of secure and robust applications that run on the .NET Framework. You can use C# to create Windows client applications, XML Web services, distributed components, client-server applications, database applications, and obviously T&M applications.

The C# syntax simplifies many of the complexities of C++ and provides powerful features such as nullable value types, enumerations, delegates, lambda expressions and direct memory access. C# supports generic methods and types, which provide increased type safety and performance, and iterators, which enable implementers of collection classes to define custom iteration behaviors that are simple to use by client code. Language-Integrated Query (LINQ) expressions make the strongly-typed query a first-class language construct.

As an object-oriented language, C# supports the concepts of encapsulation, inheritance, and polymorphism. All variables and methods, including the Main method, the application's entry point, are encapsulated within class definitions. A class may inherit directly from one parent class, but it may implement any number of interfaces. Methods that override virtual methods in a parent class require the override keyword as a way to avoid accidental redefinition. In C#, a struct is like a lightweight class; it is a stack-allocated type that can implement interfaces but does not support inheritance.

The .NET Framework.

C# programs run on the .NET Framework, an integral component of Windows that includes a virtual execution system called the common language runtime (CLR) and a unified set of class libraries. The CLR is the commercial implementation by Microsoft of the common language infrastructure (CLI), an international standard that is the basis for creating execution and development environments in which languages and libraries work together seamlessly.

Source code written in C# is compiled into an intermediate language (IL) that conforms to the CLI specification. The IL code and resources, such as bitmaps and strings, are stored on disk in an executable file called an assembly, typically with an extension of .exe or .dll. An assembly contains a manifest that provides information about the assembly's types, version, culture, and security requirements.

When the C# program is executed, the assembly is loaded into the CLR, which might take various actions based on the information in the manifest. Then, if the security requirements are met, the CLR performs just in time (JIT) compilation to convert the IL code to native machine instructions. The CLR also provides other services related to automatic garbage collection, exception handling, and resource management. Code that is executed by the CLR is sometimes referred to as "managed code," in contrast to "unmanaged code" which is compiled into native machine language that targets a specific system. The following diagram illustrates the compile-time and run-time relationships of C# source code files, the .NET Framework class libraries, assemblies, and the CLR.

From C# source code to machine execution

 

HT Basic

The HT Basic language.

HT Basic provides the language and environment of an HP 9000 Series 200/300 BASlC workstation for the personal computer running Windows 10, Windows Vista or Windows 7. In addition to the traditional HTBasic Legacy Editor, HTBasic for Windows includes a new windows-style editor with cut, copy, and paste, undo and redo, bookmarks, user-definable fonts, keyword colors, colored syntax error identification, and the ability to turn line numbering on or off for programming ease. The DLL Toolkit allows HTBasic to call Dynamic Link Libraries (DLL’s) written in other languages (most notably C/C++).

HT Basic includes LONG integers, STATIC variables, COMPLEX numbers, matrix math, and structured programming. The TRANSFER function for GPIB, serial and file is fully supported. Integrated debugger speeds program development. Set conditional and global breakpoints, step into, step out of, or step over subprograms. Includes six exclusive debugging windows for Watch variables, Line Breakpoints, Global Breakpoints, Trace, Call Stack and a debug Code Window. HELP, on-line documentation, and fully functional search capabilities including find/replace and next/previous error searches. LIF diskette transfer utilities (DOS, BDAT, LIF-ASCII).

HT Basic uses familiar HP BASIC syntax to control GPIB, GPIO and data acquisition cards from companies like TAMS, HP, Keithley/Metrabyte, ines, IOtech, Data Translation, and National Instruments, not to mention TransEra’s own line of interface cards. Includes HTBasic Plus (compatible with HP BASIC for Windows BASICPLUS) with Dialog Statements for information like errors, file names, lists, questions, and warnings; Data Inputs Widgets like keypad, pushbutton, radio button, scrollbar, slider and toggle button; Data Output Widgets like bars, bitmaps, clocks, meters, and strip charts; and Menu Creation Widgets like menu button, cascade menus, and pull-down menus.

HT Basic makes intelligent control of standard data acquisition boards easy and responsive. Featuring an homogenous I/O system, once a connection is established, data transfer is done in the same manner, regardless of whether the connection is to a file, IEEE-488 instrument, RS- 232 serial port or a plug-in data acquisition board. This makes programming easy and portable. HTBasic allows easy control of the IEEE-488 bus using familiar HP BASIC syntax. HT Basic works seamlessly with almost every PC IEEE-488 card and the many of the most popular PC data acquisition cards.

Complex numbers, Long integers, Static variables, matrix math operations, multi-megabyte arrays, whatever your data reduction and analysis requirements, HT Basic can make it happen. Because HT Basic combines acquisition, analysis and presentation in the same easy-to-use programming language, it can handle your data from start to finish. The HT Basic Workshop offers the Advanced Math Library for highly optimized functions such as curve fitting, signal processing and FFT routines. The HT Basic Numeric Compiler provides significant performance increases for compiled math operations.

LabWindows CVI

Labwindows CVI.

LabWindows/CVI is a proven ANSI C integrated development environment and engineering toolbox. LabWindows/CVI is used to create stable, high-performance applications for the manufacturing, military, aerospace, telecommunications, and automotive industries. Take your concept to hardware faster with built-in hardware libraries, analysis functions, and a GUI builder with engineering UI components.

The LabWindows/CVI integrated workspace provides an intuitive, convenient interface for creating and managing large projects. You can also customize each of the areas to fit your specific development style and preferences, and integrate with source code control, requirements management, and data management systems. 

The NI LabWindows™/CVI development environment includes a workspace window that is divided into five main areas: Project Tree, Library Tree, Window Confinement Region, Output Region, and Debugging Region.

The projects in your workspace are neatly organized in a list called the Project Tree, which provides easy access to project files and tasks. At a glance, you can determine active projects in bold and modified files indicated by asterisks. Source code control tools can be integrated into LabWindows/CVI and icons appear next to files that have been checked out by you or a team member. With rich right-click menus in the Project Tree, you can accomplish a wide variety of common tasks on the project, files, and folders from a convenient location.

Navigating through large applications is simplified with the Source Code Browser, a cross-reference tool that lists selected files, functions, variables, data types, and macros in a program. The browser helps you identify how different parts of a program interact with each other.

Perl

The Perl programming language. (Practical Extraction and Report Language)

Perl is a general-purpose programming language originally developed for text manipulation and now used for a wide range of tasks including system administration, web development, network programming, GUI development, and obviously T&M applications.

The language is intended to be practical (easy to use, efficient, complete) rather than beautiful (tiny, elegant, minimal). Its major features are that it's easy to use, supports both procedural and object-oriented (OO) programming, has powerful built-in support for text processing, and has one of the world's most impressive collections of third-party modules.

Perl by default is very forgiving. In order to make it more robust it is recommended to start every program with the following lines:

  1. #!/usr/bin/perl
  2. use strict;
  3. use warnings;

The two additional lines request from perl to catch various common problems in your code. They check different things so you need both. A potential problem caught by use strict; will cause your code to stop immediately when it is encountered, while use warnings; will merely give a warning (like the command-line switch -w) and let your code run. To read more about them check their respective manual pages at strict and warnings.

Perl is often used as a glue language, tying together systems and interfaces that were not specifically designed to interoperate, and for "data munging",[75] that is, converting or processing large amounts of data for tasks such as creating reports. In fact, these strengths are intimately linked. The combination makes Perl a popular all-purpose language for system administrators, particularly because short programs, often called "one-liner programs", can be entered and run on a single command line.

Perl is implemented as a core interpreter, written in C, together with a large collection of modules, written in Perl and C. As of 2010, the interpreter is 150,000 lines of C code and compiles to a 1 MB executable on typical machine architectures. Alternatively, the interpreter can be compiled to a link library and embedded in other programs. There are nearly 500 modules in the distribution, comprising 200,000 lines of Perl and an additional 350,000 lines of C code (much of the C code in the modules consists of character encoding tables).

The interpreter has an object-oriented architecture. All of the elements of the Perl language—scalars, arrays, hashes, coderefs, file handles—are represented in the interpreter by C structs. Operations on these structs are defined by a large collection of macrostypedefs, and functions; these constitute the Perl C API. The Perl API can be bewildering to the uninitiated, but its entry points follow a consistent naming scheme, which provides guidance to those who use it.