04-22-2008 08:55 PM
04-23-2008 03:21 PM
04-23-2008 08:19 PM
Hi
Thank you for your help. Now I have another question: if I want to realize communication with hardwire, must I use RT model?
Now I describe my problem
I tried it according to the tutorial, but when it come to configures the hardwire, I do not understand the mean about remote system, because there is nothing in the remote system on my PC. And I do not understand how to build a target. Look forward to your reply.
Labview
SIT
VC++ 6.0
04-24-2008 05:44 PM
Hi,
There are two ways you can connect your model to hardware. It all depends on the target and hardware that you are using.
If you are using your PC to run the simulation, then what you to do specify the execution host to be : Driver VI on local host. This will run the DLL in your PC and will give you access to hardware that is connected locally in your PC.
Executing a Model DLL on a Windows Computer (Simulation Interface Toolkit)
If you are using an RT system such as a PXI RT controller or cRIO controller then the execution host needs to be : Remote Target or RT Target. This will run your model DLL in the RT system and will give you access to the hardware connected to the RT box.
Hope this helps.
Ricardo Santa Olalla
National Instruments
04-24-2008 08:42 PM
Hi
Thank you for your help. I think I do not install RT system, just in the tool of Labview has the RT model, and I tried it according to the Labview help. But an error emerges, I do not understand it. The error is the following:
Error 63 occurred during host VI initialization:
Unable to open VI Server connection to target.
Check the following:
1) You specified the correct IP address in the SIT Connection Manager dialog box.
2) You enabled VI Server on the target with the following options:
i) TCP/IP access is enabled on the default port.
ii) The host computer is in the TCP/IP access list.
iii) The driver VI is in the Exported VIs list.
Do you want to launch the SIT Connection Manager dialog box and reconfigure the simulation?
At first, the default port displaying on the Matlab command window is 6011 port, do I need to change the port? How can I change it? Look forward to your reply. Thank you!
I send the error picture to you via accessory.
Regards and Thanks
Vivian
04-25-2008 01:37 PM
Hi Vivian,
If I understand correctly, what you want is to run the simulation in your PC as a built DLL; is this correct? If this is true then your selection as Real-Time Target is correct. This option will create the Driver VI for you that will run the model DLL. This driver VI will run in your PC along with the Host VI if your Real-Time Target is your localhost. Has the connection manager generated the Driver VI? Review the links I gave you before on how to create a Driver VI if you still haven't done this part. If you have a driver VI, then whatever port you specified in the Connection Manager, should be the port used in the SIT Server running inside the Driver VI. Since you want to run the model as a DLL you only have to worry about the port specified in the SIT server inside the Driver VI.
Just make sure that the port you specify in the Connection Manager is the same one you used to create the Driver VI. If is different, the easiest thing is just to change the port in the connection manager to match the Driver VI port.
When you run the Host VI, LabVIEW should launch the driver VI by itself and then connect to it. Just make sure that the Host VI and the Driver VI don't exist in the same LabVIEW project. The Driver VI should have its own LabVIEW project. If you have them on the same project then what you need to do is run first the Driver VI and then the Host VI. This should work.
Hope this helps
Ricardo Santa Olalla
National Instruments.
04-25-2008 10:01 PM
Hi
Thank you for your help. I have done it according to your direction. Now I describe what I have done.
1) I stop the SIT Server in the Matlab command window according to the LABCIEW help (it is also your link).
2) I choose the hardwire I/O of the SIT Connection Manager dialog box, and configure the mappings.
3) The port next to Real Time Target is the port of the DAQ which I use.
4) After I configure the mappings, build the Driver VI.
5) All of the
6) In the end, I first run the driver VI ,it has a warning: the current appointed net address is used, I click continue, and then run the host VI, BUT the error emerges again.
Error 63 occurred during host VI initialization:
Unable to open VI Server connection to target.
Check the following:
1) You specified the correct IP address in the SIT Connection Manager dialog box.
2) You enabled VI Server on the target with the following options:
i) TCP/IP access is enabled on the default port.
ii) The host computer is in the TCP/IP access list.
iii) The driver VI is in the Exported VIs list.
Do you want to launch the SIT Connection Manager dialog box and reconfigure the simulation?
Vivian
04-28-2008 10:32 AM
Hi Vivian,
The problem seems to be in your step number 3. The port next to the Real Time Target should be the port used by the SIT Server, not the DAQ board port. In this case the default port is 6011. You are receiving error 63 because LabVIEW cannot open VI Server on the port you are specifying because most likely that port is used by another program. The default port (6011) should not be used by any other program. Try using that port first.
Before running the Host VI, open the Driver VI and run it. Then run the Host VI. This should work.
Check that you have VI server enabled in LabVIEW. The following is from the SIT readme file
**************
If you run a driver VI on a non-RT target and want to connect to the driver VI by using a networked PC, you must run the driver VI before attempting to connect to it from the networked PC. You also must complete the following steps on the PC running the driver VI.
********************
If this doesn't work, please tell me what your setup is: What is your target? What is the hardware that you want to use, etc?
Ricardo
04-29-2008 03:11 AM
Hi Ricardo
Thank you for your help. I have done something to my target. I changed the port to 6011. In the driver VI, select TOOLS>>Options from the pull-down menu, select VI Server, then place a checkmark in the TCP/IP. Then run the driver vi, and then host VI. But the signal can not be run in the real time, and it can not be sent to hardwire, it can not be detected by oscillograph.
I send my target via accessories. And I want to use THE I/O channel of DAQmx, but in the Hardwire I/O, there is not I/O channel. I want to output digital signal. Look forward to your reply. Thank you!
Thanks and Regards
Vivian
04-29-2008 09:39 AM