08-18-2009 08:44 AM
Hi,
I have two systems one running LabVIEW and the other running dSPACE. I am now trying to integrate these two systems. I need to use LabVIEW as the main front end for this setup. This means that I need to trigger dSPACE, and acquire and display live dSPACE data from LabVIEW. Can someone tell me how this can be done?
Thanks in advance.
08-19-2009 04:19 PM
Hi Sunnyabc,
To be able to communicate with 3rd party hardware, you will need an instrument driver. Unfortunately, we do not have one for dSPACE products and a quick search on the dSPACE website didn't bring up anything. You many want to ask dSPACE whether they have any drivers that allow you to communicate with LabVIEW.
As an alternative, if you have any of their software, you may be able to use the System Exec VI to programmatically open their software to acquire data.
08-20-2009 07:13 AM
Olivia,
Thanks. dSPACE thinks that I could use their CLIB (c code) to communicate with LabVIEW and other third party tools. However, they are not sure that LabVIEW can communicate this way with dSPACE. Please advice on this.
Thanks in advance.
08-20-2009 09:56 AM
08-20-2009 12:08 PM
It is a C library, but they say that it shouldn't be too difficult to create a C DLL. I have LabVIEW and dSPACE running in two different PCs. The task is to access live dSPACE in LabVIEW (another PC). Can this be done?
Thanks
08-20-2009 02:10 PM
08-20-2009 02:49 PM
Can you be specific on how to do this? Yes, two PCs need to share the data. In addition, I want to use LabVIEW as the front end, which means that I need to trigger (start and stop) dSPACE from LabVIEW.
08-20-2009 03:01 PM
I've never used dSPACE so I can't be more specific as to what would be necessary on that side. When we set up the communication over CAN, we just needed to match the specification our partner provided. They didn't let us see their code, and we didn't let them see ours.
In order to provide a more specific answer for LabVIEW you'll need to provide more information about your configuration. What communication options does your dSPACE system support? Does dSPACE provide a way to send and receive data over TCP/IP? If so, that's probably the easiest solution. LabVIEW ships with examples demonstrating how to send and receive data over TCP. If your dSPACE and LabVIEW systems both have CAN cards then that's another option. Once you know what type of network you'll use for the communication, the next step is to determine what data you'll send back and forth, how you'll format it, and how often it will be sent (does one system need to request it from the other, or will it be updated periodically). Once you've defined the data format and frequency you can write your LabVIEW and dSPACE code to implement it. In your case, it sounds like your dSPACE system will need to wait for a trigger from the LabVIEW system, start running, send data back to the LabVIEW system for display, and stop when triggered from LabVIEW.
08-20-2009 03:32 PM
Thanks. Maybe, a picture helps. I am trying to integrate the above two systems. Right now, they are running independently. The following two tasks need to be completed: 1. Control the complete setup (start/stop) from LabVIEW. 2. Transfer live data between 2 PCs.
Can you provide some suggestions? Thanks.
08-20-2009 03:37 PM - edited 08-20-2009 03:39 PM
The picture you attempted to provide is not visible because you linked to a file on your local computer. You need to use the image upload button (looks like a picture of a tree).
I can't provide any more suggestions unless you can tell me what communication options are available to your dSPACE system. If you cannot modify your dSPACE system at all then there's nothing I can do to help; all my suggestions assume that you have access to the dSPACE code and are capable of modifying it as necessary. As far as I know there is no way for LabVIEW to control an existing dSPACE application directly, certainly not remotely - you need to write code to allow the two applications to communicate. If the amount of data you need to share is small, you might be able to simply connect a few analog and digital signals between the two systems - for example, connect a digital output on the LabVIEW system to a digital input on the dSPACE system, and when the LabVIEW code turns on that output, use it as a trigger in dSPACE. You'll still need to modify your dSPACE code to do this, though.