LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why don't examples work?

I'm an old hand at LabVIEW (15 years), but a newbie to RT.

I just loaded the RT module (7.0) on top of my Windows 2000 LabVIEW 7.0

Just plugged in my 7041 board, and ran a few basic things, targeting the RT board. All is well.

Ran some timing tests on the RT, all is well.

But when I try to run the examples, nothing works - and the instructions are extremely lame.

I'm probably missing something, but the instructions cause more problems than they solve.

#1 ------

I target RT, load the example TOOLSETS : REAL TIME : COMMUNICATION : SPECTRUM ANALYZER - RT
The instructions say 1 -- Download VI to RT and 2 - Run the host counterpart in Windows.

I set the device# to 1 why is it defaulted to 2??? , and do the Download.

I target Windows, open TOOLSETS : REAL TIME : COMMUNICATION : SPECTRUM ANALYZER - HOST
The instructions say : 1- download the RT side (already done), 2 Enter the machine name what machine name? when connecting to processor card, the syntax is DAQ::
So I set the DAQ Device to 1 why is it defaulted to 2??? , enter "DAQ::1" in the MACHINE NAME field, and run.
--- Error: VI reference is invalid.
I try "DAQ::RT::0" in the MACHINE NAME field - it takes longer, but still says:
--- Error: VI reference is invalid.
Everything I try, I get the same error.

#2 ---

I target RT, load the example TOOLSETS : REAL TIME : COMMUNICATION : TCP - RT
The instructions say 1-Enter PORT and #Points 2- Run VI 3 - Choose EXIT WITHOUT CLOSING RT 4-Run Host version from WIndows.

I leave the port as is (2055), and run the VI. It downloads. I exit without closing.

I relaunch LabVIEW (which targets windows now), and open load the example TOOLSETS : REAL TIME : COMMUNICATION : TCP - Host why are there TWO of them with that name?

The instructions say: 1-- Have the RT side running. 2- Enter the port why is is not the same as the RT? and choose a function What the heck does THAT mean? There is no FUNCTION selector. 3-Enter the address of the device on the RT engine. when connecting to processor card, the syntax is DAQ::. 4 - Run the VI.

So I change the port to 2055, enter DAQ::RT::0, and run.

Error: Network address is ill-formed

If I try DAQ::1, I get:
Error: Connection closed by peer

Everything I try, I get the same errors.


#3 ---

I target RT (the previous TCP program is still running - I kill it), open the example TOOLSETS : REAL TIME : COMMUNICATION : DataSocket-RT
The instructions say: 1- To use live data, start the DataSocket Server on he Host. 2- Target RT and run the RT side 3-- Target host and enter the same URL same? Same as what? (dtsp://locahost/wave) apparently I was supposed to enter that into the RT side, as well for this example, and click the connect button. Unfortunately, there is no CONNECT button


Anybody have a clue what I am missing?
Why is it so hard to write instructions that have some bearing on the VIs?
Why are they pointing to CONNECT buttons that don't exist, FUNCTION selectors that don't exist?
Why do they have the default port as 2055 on the xmitter, but something else on the receiver?

Signed,
Grumpy
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 1 of 5
(3,288 Views)
Hi,
Let me try to help you with this.
#1
This example and some other communication examples assume that the PCI plug-in RT board is 7030 based, so the default DAQ device # is 2 in these VIs. DAQ device# for 7041 should be 1 as you chose. Also instead of "DAQ::1" you need to use "RT::0" for PCI-7041 board. These corrections should eliminate the "error:VI reference is invalid". If not please check the VI server configuration settings on the RT engine
To configure VI Server on the RT system, target the system with LabVIEW and select Tools�RT Target: Options.

Under VI Server: Configuration make sure that all enabled check boxes are checked and that the Port number is 3363.
Under VI Server: TCP/IP Address make sure that there is a checkmark next to your IP address or next to an asterisk (*).
Under VI Server: Exported VIs make sure that there is a checkmark next to an asterisk (*).

#2
As you realized, there are two TCP-Host Computer.vi and this was a known issue and fixed in LabVIEW 7.1
You need to close the one you are using and open the first one in the list. I have attached a screenshot of the front panel of the correct VI you need to be using, please refer to the attachment. As you will notice, the correct host VI has a function selector and the port number is selected as 2055. You still need to enter "RT::0" instead of DAQ::1 in the machine name/IP address.

#3

This example program needs to be modified to be able use with 7041. First of all, after you target to RT device and open the "Data socket RT engine.VI" select File>>VI properties>>Windows Appearance and select "Default" instead of "Custom" This will allow you change the Execution target from the menu after you run it. Also modify the dstp path as
dstp://localhost/wave
After you change the execution target to Windows and open the Datasocket host computer.VI you should be able to see the sine wave.

I hope this helps, let me know if you have any questions.

Best Regards,
Remzi A.
Applications Engineer
National Instruments.
Message 2 of 5
(3,288 Views)
instead of "DAQ::1" you need to use "RT::0" for PCI-7041 board. These corrections should eliminate the "error:VI reference is invalid".

--- It did not, but read on ...

If not please check the VI server configuration settings on the RT engine.


Under VI Server: Configuration make sure that all enabled check boxes are checked and that the Port number is 3363.

The TCP/IP Protocol box was OFF (I know for sure I never touched this - I didn't know it was there.

Under VI Server: TCP/IP Address make sure that there is a checkmark next to your IP address or next to an asterisk (*).
The list was empty - I added an asterisk and checked it.



Under VI Server: Exported VIs make sure that there is a checkmark n
ext to an asterisk (*).
Was OK as is.

So, doing all this made this example work.

So where in the docs would I find this info ? When the description for the VI itself tell me to do X, I tend to believe it. My telepathic interface seems to be down...

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 3 of 5
(3,288 Views)
#2
As you realized, there are two TCP-Host Computer.vi and this was a known issue and fixed in LabVIEW 7.1
You need to close the one you are using and open the first one in the list. 


--- OK. A free cluestick to whoever thought having two VIs with the same name was a good idea.

You still need to enter "RT::0" instead of DAQ::1 in the machine name/IP address.


This works, if I use the proper address -AND- the proper VI.
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 4 of 5
(3,288 Views)
#3 works, as well. I neglected to mention that part of my problem here was that there was another VI with the same name, but in the DEPLOYING section, not the COMMUNICATION section.


Thanks for your help...
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 5 of 5
(3,288 Views)