Jump to content

KoBe

Members
  • Posts

    42
  • Joined

  • Last visited

Everything posted by KoBe

  1. Yes... I want to reuse the same ability VI (Image.vi) for all my Xnodes. Just by searching for a *.vit in the currents VI's (Image.vi) folder I want to load the Icon of the template. Each Xnode has it's own folder containing one or more templates, ability VI's and the xnode itself. That allows me to reuse my own existing VI's with Icon as template for a Xnode and the Icon is automatically loaded. I don't even have to adapt the Ability VI for that, because it searches always in the right (It's own folder) for the Icon. To create an Xnode i do normally: Write or reuse a template Copy xnode + ability VI's in a new folder. Rename xnode and save all Ability VI's Open xnode with xnode manager and adjust version, icon and Name Adjust GetTerms3.vi Adjust AdaptToInputs.vi and normally thats it. :-) Additionally for user friendlyness: Help Ability should have the same Icon as the Xnode, that is displayed in a Menu Entry of your palette. You can write a short Help Info by typing the description of your Xnode into the description of your Help Ability VI.
  2. Thanks rolf, I was searching exactly for such a function. Now runtime improved drastically. Adaption of Inputs on Datatype consumes less than 2 seconds, place on diagram too. Problem with mouse over does not appear anymore. Thank you rolfk and gb119 for your help. I will clean up my VI's now :-)
  3. Found out that runtime problem is due to Open VI Reference, which opens a template VI. This template VI contains the Xnodes Code. Information like Icon Image are also taken from that template VI. Just in the moment when I open a template containing other Xnode these all get initialized i think and that takes time..... I call Open VI Reference in GenerateCode but also in Image to get the actual Icon from the template for my XNode. Icon is also used in Help. Help is called every time I move over the Xnode on my Diagram. Therefore I would like to extract the Icon Image not by Reference-> VI Icon Get as Image Data but directly out of the Binary/String data of my template.vit to reduce the number of Open Vi Reference calls. Do you know how to find the bytes containing information about the icon of a VI / VIT? Bye
  4. I'm not sure if I get your point right. Example: Placing my Xnode on the Diagram triggers about 10 times or even more often the AdaptToInput Ability VI of a Xnode 3 hierachical level lower. I checked that with a breakpoint. AdaptToInputs is checking if the input type is same or different. If different, then run GenerateCode, else do nothing. Is that what you meant? But it seems that the type checking itself makes lot of troubles. For example if I have arrays of clusters or any insane combination of different data type I have to generate first of all default data of the new input type and of the existing type. Than I compare their values, if they are equal or not. Their are contained VI's like Variant to Flattened String and some ugly selfmade code to generate default data out of the type descriptor. Then again Flattened String to Variant VI, some loops and so on. How could I compare just the data type more easily or with less calculation effort? I don't even know, if that is the only cause for this bad runtime.
  5. Hi people, it's me agian. I'm still working on Xnodes using LV8.6. I have Xnodes, which include other Xnodes. The height of Hierarchy is 4 and it works. Adaption of Inputs works for the whole Hierachy when I change an Input Type of the Xnode on the top of Hierachie. Problem: BAD RUNTIME BEHAVIOUR. Even if do not work on the Xnode directly but only on the same Block Diagram the LabView environment is getting slower and slower depending on the depth of the Hierarchie. In my opinion, (I didn't debug it until now) this happens, because the "Child-Xnodes" are updated each time when their "Parent-Xnode" is updated. In my case that means: 100% of processor load for 10 to 15 seconds and RAM consumption raises from normal 200MByte above 600MByte. After the 15 seconds it decreases again to 200MByte. Time and storage consumption may vary on the written routines. My solution: just update an Xnode (and all its Sub-Xnodes) when I directly work on the Xnode but not when I just work in the same Diagram without changing anything that has an influence on the Xnode. OR Just update on dubble click. Question: How could I Inhibit Ability VI's to run? What Ability VI is called, when I change something in my block diagram? How could the Ability VI recognize if a change on the Diagram containing the Xnode influences the Xnode or not? Thanks and looking forward to your inputs :-)
  6. For who is interested: I resolved the problem and now I can use a Xnode in an template use for another Xnode. The problem was that the Scripting VI, which copied the diagram of the template into the xnode was not reentrant and therefore got stuck using more than 1 Xnode in a Hierarchie.
  7. 1) I can not use a template file containing a selfmade custom xnode to generate code for my new xnode. 2) I CAN use a template file containing Match Regular Expression.xnode to generate code for my new xnode. 1) is always stuck, when my generate code tries to "open VI reference" of my template containing my custom xnode. Same does not happen with Match Regular Expression.xnode in my template. Out of the "Open VI Reference" Help: "If you wire a path, LabVIEW waits until the user interface is idle to load VI from disk. " So why should I be able to "Open VI Reference" for a template containing Match Regular Expression.xnode and why it does not work with my custom xnode? What could be the difference between those two regarding "user interface is idle"?? Though I think I'm coming closer and closer to a real working solution :-)
  8. Get_t_end.xnode is a part of a template VI which is used to generate the code for Get_Periode.xnode. In my opinion Labview is getting confused when it calls the ability VI's. It can not differ from the Abilities of Get_t_end.xnode and Get_Perdiode.xnode because the Ability VI's have the same name. So I can try to use my template vi, which contains the Get_t_end.xnode by replacing the xnode by the diagram (code) contained in that xnode. Then the template vi contains no xnode anymore and it should again be usable to generate the code for Get_Periode.xnode. The question is: when should I replace the xnode by it's code? What is the first ability VI which is called, when I drop a xnode in my block diagram (OnDrop) ? Maybe that would be the right time for the replacement. So what would be the steps: 1) On drop of Xnode: 1.a) search for "Sub-Xnodes" in the loaded template VI of the Xnode 1.b) get actual block diagram of each "Sub-Xnode" (I can't even imagine how I can access the block diagram of a Xnode!!??) 1.c) replace "Sub-Xnode" by their code in the loaded template. 2) From now on the template vi for my Xnode contains no "Sub-Xnode" anymore and should work fine. So I will try that and will let you know if it works. :-) Bye
  9. Hi guys, it's me again. I'm still playin' around with Xnodes and it's working very well until now. I'm working on a Library for Ddta aquisition and data elaboration. I do need to adapt several input terminals to my needs. This works with Xnodes :-). Now I would like to use my Xnodes allready programmed as SubVI's of other Xnodes. Example: Consider a waveform-like cluster: Y: Array of DBL data dt: DBL t0: timestamp attributes: string Y is of variable type, it can by an array of any datatype, clusters ..... Get_t_end.xnode calculates the timestamp of the last data elment according to the number of element in Y and the timestamp t0. Get_Periode.xnode should then use Get_t_end.xnode to produce a cluster: t0: timestamp t_end: timestamp The problem is, whne i drop Get_Periode.xnode on a blank VI, Labview is stuck and I have to shut it down with the taskmanager. Has anyone an idea how to insert the code of one Xnode into an other? My idea was to use *.vit files and adapt terminals by scripting. The problem I think is the Xnode inside the *.vit, which also should adapt its terminals when the "owning" Xnode is droped or the data type of the input is changed. Thanks
  10. New Problem: It can happen, that I'm not able to connect my Controls to the right FlatSequence Terminal because of same names. Until now I connected the Terminals of my Control and the Terminals of my FlatSequence by combining those Terminals, which have the same Terms.Id String with FlatSequence.Terminals.Name. But FlatSeqence.Terminals[].Name is not unique!! Therefore I did describe my wires inside the flat sequence on my block diagram with the same string like I use for ID in GetTerms3.vi Further steps: 1) Compare FlatSequence.Frames[].OuterTunnels[].InnerTerminal[x].ConnectedWire.Description == Terms.Id 2) if String matches, use FlatSequence.Frames[].OuterTunnels[x] and conneconnect Terms it. That works because FlatSequence.Terminals[] is the same Reference like FlatSequence.Frames[].OuterTunnels[] Now everything works, so you get a summary of my topic: How to adapt inputs of a VI with Xnodes?? 1) Take VI and make a FlatSequence around all this in the Block Diagram. Let the Controls and Indicators outside. 2) Name the Controls/Indicators like you want (String) 3) Right click on each wire, which is connected to a Control/Indicator outside and type as Description and Tip the String corresponding to the connected Control/Indicator 4) Save this VI as a template *.vit in the folder "MyNewXnode\" 5) Create Xnode with all necessary Ability-VI's 6) Adapt GetTerms3.vi to your purpose: ID has to have the same String like the Controls/Indicators of your *vit, the same String like your Wire Descriptions inside the FlatSequence of your *.vit 7) Then you can use the FlatSequence out of your *.vit and run the above mentioned 2 steps to connect the FlatSequence Terminals to the Controls/Indicators defined in GetTerms3.vi If anyone should be interested, I can post also the source code. Thank you all for the source provided in this Forum although I got 0 replies until now. My life is now easier since I have adaptable controls on my VI's.
  11. I managed it with a small workaround to get my desired data type adaption out of a functioning VI template which had all Controls and Indicators connected to its Connector Pane before "GenerateCode.vi" was called. The workaround is to insert a Flat Sequence around the block diagram of my *.vit. That shouldn't have much impact on runtime. Then with Generate Code I take the Flat Sequence Reference and use it like the ForLoop Reference in the "Enqueue Array of Elements" example to generate my adapted Xnode. Nevertheless this is not as elegant as I wanted to have it, because for all VI's I want to use as templates for my Xnodes, I have to insert manually the Flat Sequence around the code. So if anyone has an idea of a solution without the "Flat Sequence workaround" I would appreciate that. Without Flat Sequence: When I look which classes are contained in my diagram by reading the ClassName of all Generic objects in a diagram I get classes like SubVI, Function, ... and ControlTerminal. Then I selected the Control Terminals by ClassName and typecasted the class type to more specific "ControlTerminal". Then I tried to delete the Controls. That didn't work because i didn't have the permission. How can I get the permission to delete parts out of a diagram? Next steps would be: Before deleting the controls, get references of the wires, to which the ControlTerminals are connected to. The delete. Then connect the new controls and indicators defined in "GetTerms3.vi" of my Xnode to the open wires in the right order. Did anyone try something like that allready? Thanks
  12. Hi People, since a few days I`ve been working with Xnodes and VI Scripting. I managed to create a Xnode which adapts its input according to the input data type like the example "Enqueue Array of Elements" which can be found in the Discussion "Xnode Wrapper for Preview Queue Element"here. Enqueue Array of Elements uses a Template VI, which has no Controls and indicators but just a ForLoop (with terminals) and it is not functioning because of broken wires. By adding the right controls and indicators with xnode routines a functioning block diagram is created an inserted in the xnode which then can be used like a VI with the appropriate controls and indicators on the connector pane. But I would like to go a step further. Instead of using a non functioning VI template I want to use a functioning VI as template for the "generate coode.vi" of my xnode. The example "Preview Queue Element" is a wrapper and can in my opinion only be used for LV internal VI's, because of the style input for "New VI Object". I need help for this work: Steps: 1) Make copy of diagram and make xnode owner of it 2) Retrieve controls and indicators of the diagram, which are connected to the connector pane of the originating VI template. 3) replace data type of a specific control Differnt solution possibilities for 3): a) replace data type of control or b) replace control by control with appropriate data type c) delete control, insert and wire up control with appropriate data type Can anyone help me please? I'm working on LV8.6
  13. Hi people, I have some questions on the NI-9211. I didn't find any description in the documentation of NI-9211, how the cold junction temperature is measured (IC or Resistive, Voltage or Current Reference). The point is that I would like to make a cold junction compensation by the use of the "Convert Thermocouple Reading.vi". Additionally I want to use the Autozero value. How do I have to use this value? Just subtract/add to the raw voltage of each thermocouple? Does the Autozero must be applied also to CJC voltage to assure best results or only for TC0..3 channels? Thanks
  14. Hi, I'm using the CRI Tool to read the System Configuration Information of a cRIO System. Now I would like to do the same thing with Fieldpoint and wireless components. Do these devices allow to read such data from the RT-Controller, Backplane, Slots/Modules ? Look @ CRI Tool for cRIO: http://zone.ni.com/d...a/epd/p/id/1717 Figure 7: cri_cRIO Vendor and Components Library.vi: Lookup tables of cRIO components and vendors That would be a interesting also for Fieldpoint and wireless components. Has anyone an idea where to get all this information from? Couldn't find it in datasheets or reference handbooks of the devices. Thanks
  15. Thanks for your post. These examples are too complex just to try once. Let's go back. I would like to know if a RT-target like cRIO or cFP can call VI's by reference, which would be the basis of changing the software on the RT-target in realtime. Thx
  16. Hi people, I would like to design a monitoring system with cRIO, where I can update the firmware without disabling the running monitoring programm. How that? IDEA: The cRIO runs 2 parallel loops in a standalone application: 1) dynamically load the monitoring.vi and let it run infinitely if not remotely stoped by user, must run also if TCP/IP is not available 2) TCP/IP connection to my computer to eventually upload a new monitoring.vi, restart of loop 1) to run new monitoring.vi PRO's: Systems can be installed "naked" at monitoring site, when the specific monitoring.vi is developed, no travel is needed. Buggy firmware can easily be exchanged, no slow restart of cRIO is needed, just on the fly replace dynamically loaded monitoring.vi within 1 second (sampling rate is 1second, no data should be missed) Has anyone tried to dynamically load VI's on cRIO? What must be considered in that case? Do I need a build or just send the vi+subvi's? Has anyone experience with that? Can the cRIO also be used to reconfigure wireless acquisition points in combination with a LAN/WLAN connection? Thanks and Ciao
  17. Hi @ all! I have a similar challence. Additionally i would like to include cRIO targets programmatically into the project structure. The type of the cRIO, chassis and modules is given and should be programmatically added to the project. A played arround several hours, but I didn't find out how to add an other target beside the "My computer". The reason is that i didn't find documentation about class name, type, reference and so on of embedded target. Could anyone help me please? Thank you
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.