LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

use of graphs within Labview RT

I am using the RT wizard facility and I find that when I use build the three file (TCL, NPL and HOST) that the graphs which I want to display material on the host has disappeared. All my other controls and indicators appear to be fine, I also have some dialogue whcih appear via a string which also vanishs. Can anyone help please? Can I/ will I ever be able to do this? Do I need to just have an indicator with the original programme and then add a graph inside the host programme when built? Also I am a bit confused as to how I actually link to this within the host programme produced. It is just simply a case of making a connection within the block diagram?
0 Kudos
Message 1 of 13
(5,949 Views)
The RT Comm. Wizard looks at the controls and indicators of your VI and gives you the option to select any of them that are compatible with the RT FIFO VIs. This means graphs, charts, and strings will not be available. Graphs and charts are an easy fix by just creating an indicator so that the Comm. Wiz. will see it. Strings are not a datatype handled by RT FIFO so a workaround would be to convert your string to an array of U8s and then you would have to convert it back in the host VI.

I'm not sure what you mean by 'link' in your question. The basic procedure would be to use the RT Comm. Wiz. to create the three VIs. Then target LabVIEW to the RT system and download and run the Normal Priority Loop VI (NPL). (The NPL contains the TCL VI so there is no need
to download it seperately.) Then switch execution target to Windows and run the Host VI.

Regards,

JR A.
Application Engineer
National Instruments
0 Kudos
Message 2 of 13
(5,949 Views)
Thanks for this - I had just sorted this out but it was helpful to reinforce this with your comments. I am having problems now getting the VI I create with RT wizard to work. I keep getting error messages relating to the TCP open ( server refused access) and then TCP write. I think this is linked to the TCP port number. The RT wizard seems to use the port 12344 as a default where the embedded machine port number is 3363. When I modify this, both at the start of the wizard and at with the Host and NPL files it again shows an error. I have modified the options on the RT device and the host to accept access from each other and I have used the wildcard(*) to accept all remote VI's - I think this is all I need to do( i have checked the TCP access box.
0 Kudos
Message 3 of 13
(5,949 Views)
The options that you are changing sound like the options for VI Server, which has a default port number of 3363. The VI's that the RT Comm. Wiz. create are actually using the TCP VIs which open their own port. The NPL VI has a "TCP Port" control which defaults to 12344. When this VI starts it begins to listen for a TCP connection on that port. The Host VI has controls for "IP Address of RT Target" and "TCP Port" which correspond to the port which the NPL VI has opened on it's IP Address. You can select any unused port on your system but the port number on the Host and the NPL VIs must match. If you try to use 3363 it is probably already taken by VI Server and that is why you are getting the error.

JR
0 Kudos
Message 4 of 13
(5,949 Views)
OK.I'm just about to try this but I thought I would clarify something. Can I use any port number ( what would the range be?) and do I have to then set anything with the RT or host options? You were right with the other settings. This was when I was trying to operate the remote panel using VI server. I was told I could set this up by using VI server or by loading the NPL vi on the target and evoking this from the host and I was confusing the two. I'd be grateful for a bit more help on this - if I can get this cracked I'll be a happy man!
0 Kudos
Message 5 of 13
(5,949 Views)
You can use any port that is currently not used. (On UNIX 1024 and below are reserved.) The default ports that the RT Comm. Wiz. are using should available on the RT system. If you select a port that is in use you will get an error telling you that and you can try a different port. (Side note: LabVIEW allows you to change the port that VI Server is using in case another application requires you to use port 3363. The port that the LabVIEW Web server is using is default to 80, which is the default for most web servers, although you can change that as well.) But there are so many ports that you shouldn't have a problem finding an available one.

JR A.
0 Kudos
Message 6 of 13
(5,949 Views)
OK I have tried this and this works fine now( you have to ensure that the NPL is running and not just downloaded!). It seems to have introduced some instability in my control but I can sort that out (there must be some transfer across the network that shouldn't be there). If I want to actually embedded this application so that it automatically accesses the NPL when I invoke the the HOST is this best using VI server? I need to build my application into a standalone job as I have to send this out as a bit of test equipment.
My control VI ( that embedded on the RT target is the same but I want to use three different front panels to envoke this using the different input devices ( an array(flight profile), an interactive device
(a slider) and an external input). There are subtle difference between the core control VI's so I think I know the answer to this, but, in theory can you have three different Host VI's calling the same NPL and TPL?
thanks for your help on this - apologies for all the questions!
0 Kudos
Message 7 of 13
(5,949 Views)
VI Server would be the way to go about this. (Make sure you have the correct VI Server options for the RT System.) You can then just FTP the VIs or a library (.llb) to the RT system and then use VI Server to launch them. There are shipping examples that show how to use VI Server which would be helpful for you. And yes you can have different Host VI's call the same NPL VI as long as it transfers the same data over TCP. Also, you are free to modify the code that was generated by the RT Comm. Wiz. to customize it for your application.

JR A.
0 Kudos
Message 8 of 13
(5,949 Views)
This has been really helpful thanks. I have set this up now using some help from the VI server examples. I have down loaded the NPL parts of my VI to the host, and I am then calling these via VI server ( using open application, open VI reference and call by reference nodes), whilst at the same time calling the host. This seems to work fine, however when I stop the NPL and Host VI's the open by reference node is not released, and therefore it does enter into the close reference block. Any ideas? The other thing I was going to ask was about the the wait block which is the the host and NPL blocks. Does this have to be 100ms because I tried changing this and although it still seemd to execute I got no interacti
on going between my host and the target.
0 Kudos
Message 9 of 13
(5,949 Views)
You should be able to use whatever loop time you want within reason. Instead of using a Call by Reference node you might consider using property and invoke nodes to control the execution of the VI. They will give you more flexible control. Check out the FrontPanelStates.vi example in the example finder (Browse by Directory Structure then viserver>>uicntrl.llb)

JR A.
0 Kudos
Message 10 of 13
(5,949 Views)