From Thursday, May 23rd (05:00 PM CDT) through Friday, April 24th (1:30 AM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

dll can not be recofnized by sit connection manager

My current configuration:

Windows Vista SP1

LABVIEW 8.5.1

Simulation Interface Toolkit 4.0

Microsoft Visual Studio 2005 (Professional)

Matlab R2007b

Simulink 7.0

 

Hi:

I am building a dll file from a mdl file using Real-Time WorkShop( the model is interfaced with a Labview VI using Simulation Interface Toolkit). At this stage, I am not geting any error messages, so the corresponding dll file was generated successfully.  Then in order to run the model in real time mmode, I am opening sit connection manager from tools->sit manager and showing the DLL file generated by the Real-Time Workshop  as my real-time target on the sit manager connection window. Then the following message pops up on the screen :"The DLL you specified is not a valid model DLL." I was wondering if there is anyone who experienced the same  (similar) problem and has some suggestions as to how to overcome this problem.

Thank you

0 Kudos
Message 1 of 9
(4,028 Views)

Hi,

 

Are you selecting niddl.tlc-NI Real-Time Target when you are building the dll?

 

Does the model reference and .c or .h files that you may not be including?  Make sure that you are following the procedure listed in the SIT 4.0 Help. http://zone.ni.com/reference/en-XX/help/371504C-01/lvsimtkhowtoconcepts/simulink-sit_h_convert_model...

 

Have a great day

Justin Parker
National Instruments
Product Support Engineer
0 Kudos
Message 2 of 9
(4,009 Views)

Yes I did select niddl.tlc-NI Real-Time Target. Also my simulink model is a very simple one;one signal generator and one in put and output ports so I am not using any c and h files in the model. I talked to a person today from NI on the phone and he said SIT 4.0 does not receognize Visual Studio 2005 so the compiler has to be 2003. However, the problem with that option is that Microsoft Visual Studio 2003 is not Vista compatible. I am wondering if you can suggest a complier that works well with SIT 4.0 and Vista.

Thank you so much for your response!

Serdar

0 Kudos
Message 3 of 9
(3,994 Views)

Hi Serdar,

 

I cannot suggest a compiler that works with SIT 4.0 and Vista.  SIT 4.0 requires Microsoft Visual C++ 6.0 or .NET 2003, neither of which are supported by Windows Vista.  Is going to LabVIEW 8.6 and SIT 5.0 an option?

Justin Parker
National Instruments
Product Support Engineer
0 Kudos
Message 4 of 9
(3,981 Views)

Hi I am currently using SIT to communicate with my USB 6221 device. When I use MAX, I am able to read the voltage values from the 6221 device. In my application,  I have a simulink model (very basic one, one hardware input supposedly coming from my 6221 device and one signal generator and I am adding two signals together through sum block from Simulink).Then I succesfully generated my DLL files using Real-Time Workshop.  Afterwards,   I generated a host VI and driver VI using the SIT manager (I went through the all the DAQ mapping steps succefully). By the way, as a real-time target I am using my PC. I am running the driver VI first and then host VI second and then I am getting the -200077 error with the following messages:

 

 

Error -200077 occurred at Driver VI >>
Possible reason(s):

Measurements: Requested value is not a supported value for this property.


and this error:

 

Property Node DAQmx Timing (arg 3) in DAQmx Timing (Sample Clock).vi:2->sitdaq Configure Analog In.vi->sinewave_IO Init.vi->sinewave_Base Rate Loop.vi->sinewave_Driver.vi <append>
<B>Property: </B>SampQuant.SampMode
<B>You Have Requested: </B>Hardware Timed Single Point
<B>You Can Select: </B>Finite Samples, Continuous Samples

<B>Task Name: </B>SIT_Dev1_ai3

 

According to the error, I need to use either finite samples or continous samples. However, I don't have any idea where I can change my settings to the suggested ones. I was wondering if there is someone out there who can help me solve this issue. I was looking at the block diagram of the driver VI but couldn't locate these settings. Also, is there anyone who knows how to configure the 6221 device and save it. I would like to be able to make SIT generate my driver VI based on that configuration?

Thank you so much!

Best Regards;

Serdar

 
0 Kudos
Message 5 of 9
(3,937 Views)

Soylu,

 

the driver VI was never meant to run with DAQ devices that do not support hardware-timed single point because of the weaker performance.

The other reason for using hardware-timed single point is the implicit timing of the driver VI through the DAQmx.

 

Concerning the fact that you run your model on Windows I assume that neither determinism nor high loop rates are desirable.

 

The easiest fix for you would be to upgrade your hardware to an M-series board (short and long-term perspective)

 

If this is for some reason not possible there are three options you may choose:

Option a) One SubVI in the driver VI is called <model name>base rate loop.vi. This VI is more or less the core of the driver VI. It contains the HW and model calls. The HW section is basically split into 4 parts: init, read, write and close.

To get your USB device working with the driver VI you have to modify the init VI and the write VI. In the init VI you have to change the the constant from hardware-timed single point to infinite for the DAQ input channels. If you are using output channels as well, delete the DAQmx timing entirely (in this case the DAQmx write will be on demand).

In the read VI you have to change the polymorphic instance of the DAQmx read to Multi Channels - Multi Samples.Concerning the fact that the nature of the Read VI is scalar, you have to use appropriate methods to transform the multiple samples of each channel into one scalar value (either calculate the average or pick exactly one value). Also connect to the number of samples to read exactly the number of samples you expect per channel to time the base rate loop VI appropriately.

Option b) You may refactor the Init VI in that way to set up the DAQmx sampling mode again as infinite but with the difference that you apply some additonal properties to the DAQmx task to set up a circular buffer (see attached picture and/or search for circular buffer daqmx on ni.com). If analog output is applicable delete the DAQmx timing for this task entirely (write on demand). In the read VI make sure that the DAQmx read still reads all channels but only one sample per channel. In additon you have to add explicitly a timer to the read VI. Choose Wait until next multiple and set the timer to the desired value)

 

The disadvantage of Option a and b is that all changes you made are forfeit after rebuilding the Driver VI by using the SIT Connection Manager, therefore Option c may be used instead

 

Option c) In the base rate loop VI are 4 sequences that can be filled up with user code which is untouched by the SIT Connection Manager. Basically you have to create your own VIs and put the code from Init, Read, Write and Close into the sequences. The harder part at this point is that you have to take care to put the acquired data into the 1D array. You may want to adopt the code from the read VI in this case to hit the correct indices. Whenever you change the model you have to take care to choose the correct indices you write to or read from the 1D array.

 

 

 

In SIT 5.0 we have introduced another technology where it is possible to write custom code that is used by the SIT connection manager during building the driver VI.

You would have to implement your specific init, read, write and close code once and it would be again and again used during code generation. 

This means, instead of doing certain things over and over, like in your case with SIT 4.0, you would do it once and the SIT connection manager would take care to map IOs appropriately

 

 

ThSa

 

 

Message Edited by ThSa on 12-11-2008 12:30 AM
0 Kudos
Message 6 of 9
(3,933 Views)

Hi ThSa;

Thank you so much for your very detailed answer. I really appreciate that. I think my hardware is already an M-series board, If I am not mistaken. Below is the link to the DAQ board that I have:

DAQ Device: NI USB-6221(http://sine.ni.com/nips/cds/view/p/lang/en/nid/203093)

If this is the case, do the solutions that you've suggested still apply? 

If yes, could you possibly explain the following lines of yours ( I am pretty new to Labview so I think I need a bit more guidance to be able implement this solution):

"In the read VI you have to change the polymorphic instance of the DAQmx read to Multi Channels - Multi Samples.Concerning the fact that the nature of the Read VI is scalar, you have to use appropriate methods to transform the multiple samples of each channel into one scalar value (either calculate the average or pick exactly one value). Also connect to the number of samples to read exactly the number of samples you expect per channel to time the base rate loop VI appropriately"

I'va also attached my Driver VI if you want to have a look at.

Thank you so much!

Serdar

 

Download All
0 Kudos
Message 7 of 9
(3,900 Views)

Serdar,

 

a USB DAQ device does not support hardware-timed single point.

Sorry that I was not precisely enough. You have to use either an E or an M-Series board to get this ability.

 

Concerning your question:

 If you get more values per channel from the DAQmx Read function after you have made the changes I suggested,  you have to decide what you want to do with the data, because one index in the 1D DBL array represents exactly one inport or outport of the simulation model. 

This means that you have to truncate the number of data points per channel exactly to 1(scalar).

 

To get familiar with DAQmx I suggest to take a look on the DAQmx examples by browsing through the NI Example Finder.

 

ThSa

 

 

0 Kudos
Message 8 of 9
(3,867 Views)

My current software configuration:
Windows Vista SP1
LABVIEW 8.5.1
Simulation Interface Toolkit 4.0
Microsoft Visual Studio 2005 (Professional)
Matlab R2007b
Simulink 7.0
Hardware Configuration:
PXI:1008 CHASSIS
PXI:8176 CONTROLLER
PXI:6070E DAQ Card

 

Hi ThSa:

 

As you've suggsted, I started to use an E series DAQ card. However, I am still having some problems in my application. 

 

 I have a simulink model (very basic one, one hardware input supposedly acquaried from my 6070 e device and one signal generator and I am adding two signals together through sum block from Simulink).Then I succesfully generated my DLL files using Real-Time Workshop.  Afterwards,   I generated a host VI and driver VI using the SIT manager (I went through the all the DAQ mapping steps succefully). By the way, as a real-time target I am using pxi8176 which is connected to my host computer through a crossover cable).

When I don't map my DAQ card anaolog input to my simulation input through sit manager, my code works just fine. However, when I map one of my DAQ card anaolog inputs to my simulation input through sit manager, then my driver has a broken arrow on the run button. The following errors show up in the error list:

first error (I attached a snapshot of the block diagram. The error can be seen clearly):
"The subVI is not executable. You must fix all errors in the subVI before this VI can run." in sipk_IO Init.vi
second error:

"A wire must be connected to one and only one data source, such as a control's terminal or a function output. This wire is not connected to any source, although it has one or more sinks.  You must add a source, perhaps by changing an indicator to a control." in my sitdaq Configure Analog In.vi.

I was wondering if you have any suggestions as to how to overcome this problem.

Thank you

Message Edited by soylu on 02-17-2009 04:35 PM
0 Kudos
Message 9 of 9
(3,690 Views)