LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Interface LabView to Delphi through LAN?

We have an experimental radar system to which we will add a cDAQ unit runing Windows.

cDAQ will be responsible for doing RF output testing and other stand-alone tasks. Incl. personel safety.

 

The existing software for radar control, data aquisition and presentation, running on three different PC's, is written in Delphi.

Communication across LAN is currently done using UDP and small virtual files called Mailslot. Internally on each PC Windows messaging is in heavy use.

 

How do I interface existing Delphi software to a new LabView app. on the cDAQ?

 

The data to be transfered will mostly be message like. I.e. short commands and status values, like trippoint for max transmitted RF power and actually meassured transmitting RF power. Some of these measurments received from cDAQ are to be entered into the data stream to disc. (File header parameters)

 

My LabView skills are in general novice. For Delphi they are somewhat higher Smiley Embarassed

 

Is it easier to have a small LabView app. running  on one of the PC's to handle the LAN communication and from there interface locally?

Do it the other way around with a small Delphi app. on the cDAQ?

Or how to do the interface directly?

0 Kudos
Message 1 of 6
(4,045 Views)

Hi Walker12.

 

 

Welcome to the forum. How is it going with your application?

 

NI does not have any drivers that will work with Delphi. However, we do have support for other text based languages such as C++ and C#. For examples, how a look at this whitepaper:

Learn 10 Functions in NI-DAQmx and Handle 80 Percent of Your Data Acquisition Applications

 

One idea could be, to develop the data acquisition in LabVIEW and use UDP to do the communication between LabVIEW and Delphi. I have attached an example (that is also included in the standard LabVIEW installation), that shows how to use UDP in LabVIEW. Open the two functions called "UDP Receiver" and "UDP Sender" and follow the instructions.

 

Another way of communication between these two languages, is to write the data to a file, that gets read in by Delphi.

 

Let me know if I can help you any further.

 

Best Regards

Alex E. Munkhaus
Certified LabVIEW Developer (CLD)
System Engineer
0 Kudos
Message 2 of 6
(3,921 Views)

Redoing 10+ years of Delphi programming in LabView does not look like an option. certainly not with my LabView skills, or the time frame at hand.

 

I know LabView somehow can be made to send and receive Windows messages, so using a small Delphi app on the cDAQ to handle the link down is an option.

 

We have a skilled LabView programmer, but he is busy elsewhere and can only be called on for short questions.

He does not know anything about Windows messaging or cross language communication, however.

0 Kudos
Message 3 of 6
(3,909 Views)

Which cDAQ are you using? Most cDAQ cannot be used to run a program directly but are flexible measurement systems connected to a computer by USB or Ethernet for example.

 

I think that hooking up on UDP or your Mailslots can work out quite well. Accessing the Windows messaging queue is possible, but requires yourself to implement some wrappers for the Windows SDK functions for the queue..... as novice, i would not do that.

 

The main questions regarding Delphi (as is) and LabVIEW are:

What does the Delphi application perform and how does LV fit to that in regard to functionality?

What are the commands and data you want to pass between these two components?

What are possible performance constraints?

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 6
(3,905 Views)

Our general Delphi app. spread is as follows: There are more applications, TWT control for instance, but these four are the main core.

 

Control panel    (Setting up radar parameters, recording modes, speeds, channels, transmitting frequencies, RF power, frequency switch timing etc. Calculation on recorded data. Live or off-line)

Data recording  (Reads data into memory, present it for calculation and may stream it to disk.) Can be substituted by an off-line app. reading data from disk for off-line calculation.

Display            (presentation of calculated results. On- and off-line. Usually runs on PC 2)

Platform control (Control of turntable/platform. Presentation of two video streams from IR and visual cameras to ensure radar is pointing at target. This runs on PC 3)

 

Communication goes on between just about all four apps.

 

cDAQ-9138      Located in RF front-end. Windows-based.. Reading of four RF power sensors. (only LabView drivers available!) Sending these parameters down for visual presentaion

                      and file header.

                      TWT amplifier cut-off in case RF power goes above a user set threshold.

                      Other tasks such as temperature measurements, power supply monitoring, possible ALC etc.

0 Kudos
Message 5 of 6
(3,896 Views)

In such case, i recommend you to write a LV based program running on the cDAQ using TCP or UDP to provide data.

All other application components can subscribe to that program to receive data and work on them.

 

Using such approach has two major advantages:

a) You can run the application components on different PCs, e.g. if computation performance is lacking on one machine

b) It is a generic interface which is rather simple to use in different programming languages

 

Using Windows messaging lacks independency and might introduce additional cultrips as bustling with Windows internals can lead to ....strange situations.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 6
(3,886 Views)