Jump to content

Ton Plomp

Members
  • Posts

    1,991
  • Joined

  • Last visited

  • Days Won

    38

Posts posted by Ton Plomp

  1. i'm a newbie..

    That is not really an issue. First plan your steps. Make some flowchart (or something you familiar with), that cover the steps you want to take.

    Now build the framework of your software with this flowchart in mind

    Then start solving little problems.

    In case of an issue come back here, we will welcome you if you add some code, show what you have done and learned already.

    Ton

  2. In the same directory, there's also a template to build your own pages (i guess), called pageTemplate.vit with an unlocked diagram. it's window title is "Use VI Window Title as Category Name" :)

    you'll probably be able to figure out how the dialog works from that. it has this comment in the "PanelClose?" event case:

    "This is useful during development,

    so you can run your page VI without

    the dialog framework.

    This is very nice of NI, I think they did this on purpose (really). I haven't looked at it yet but it sound very promising!

    :thumbup: :thumbup:

    Ton

  3. It looks like the constant folding is doing very weird.

    If you use execution highlighting, you will see that the for-loop will run just once...

    N will be 100 and I will stay 0 :nono:

    But if I change the contant to a complex type (cxt/cdb/csg) it will run 100 times (I=99)

    Extended and double will run as well, other file types not...

    However if I forced a data change to I32 I saw that I went to 1 and then got this:

    post-2399-1164697021.png?width=400

    oops :unsure:

    EDIT: what is the NI-forums discussion link?

    Ton

  4. I mean other dots like the coercion dot that can appear when we connect an input to a VI. :D

    Sorry, I'm not sure if I am clear because of my poor level in English! :unsure:

    They are the same, it means that you wired another data-type than the VI internally uses. LabVIEW has for certain data-types built-in conversion tools

    Ton

  5. Hi All,

    I am using scripting to add some version info to VIs, now the data is stored in some typedef with an icon. It would be nice if the terminal of the TD on the VI BlockDiagram would show the icon. (View as Icon)

    Does anyone found the propertynode for this. (it didn't exist on 7 and in 8.x you can't create new ones)

    Ton

    post-2399-1164177763.png?width=400

  6. Hi,

    I posted this in the code repository and I was told to post it here instead. I have a problem that Im trying to figure out. How do I open up an instance of microsoft excel on the machine that is remotely controlling the server. I have figured out how to make the remote panel open excel, but it only opens up on the server machine, not on the machine that is remotely controlling the server. Anyone have any suggestions?

    thanks

    jdoggers

    What you need is an ActiveX container that can hold excel. I am not ware of such a container, maybe a search on embedded excel? It looks like MS is doing it when you add a workbook into word and edit that... Maybe that is the idea to go

    Ton

  7. Too bad that while they were at it, they did not fix the insert>unbundle by name or insert>unbundle.

    I think it has to do with the order of inputs of the 'unbundle vi'-code. and the way insert works. I think it inserts between the first input and the first output.

    Rearranging the input/output order might break old code?

    Oh sweet. I missed this one during beta, but was wishing for a way to do this for a while now. That and things like the "bundle cluster in error wire insertion" is really making the LabVIEW editing feel a lot more intelligent these days.

    I think this was present in 7?

    I must admit I kinda like the new palettes, only if it could be possible if I can start directly in the 'Programming' palette.

    Ton

  8. Thanks for the tip, Ton! I actually had thought about that but I had problems lately to download the OpenG software. Do you know a working download link?

    Franz,

    Lately the OpenG has made a rather shocking movement, the openg commander became obsolete (there will be no further updates). It is more a nice study VI for how complex programs can be written.

    Now downloading of Openg toolkits can be downloaded with VI Package Manager by JKISoft which is a excelent piece of software. It shows how a LV software could look like.

    Ton

  9. BTW: A VI doing what I describe above should have been written by someone already, but I couldn't find it. I'd be grateful if there is such a VI and somone can point me to it.

    -Franz

    OpenG has a VI to save the front-panel contents of a VI into an INI file. That's the fastest route I know.

    Normally I use the cluster to INI file function

    Ton

  10. The attachment is password protected :blink:

    It is supplied on the frontpanel (why this method Johan)

    But why do you have 2 event structures in one loop?

    The time-out will make sure the loop will finish but there will be a pile up of events (eg. one event loop gets every 5 ms. an event but must wait 10 ms on the other event case)

    And the right-event case looks like a set off radio-buttons, use the native form of this. Or use an array, have a value change event and XOR the old and new value and write this a value property (NOT signalling)

    The same goes for the left.

    For a quick start start the task before the while loop!

    Now in continious mode the number of samples means almost nothing, it is used for setting the buffer size (see DAQmx help).

    Every run 10 samples are written.

    Could you show the text file created?

    Ton

  11. But I don't really like this, because is not very elegant to have a VI with dynamic events it won't use ever, and furthermore, if I change my mind about an event, I must readapt manually all the controls and indicators in the subVIs, even if those VIs will not use the changed event

    I don't think you will pay a speed penalty for 'empty' events. And you should create a Type Def control for the event registration. If you do that you'll only have to edit the TD

    Ton

  12. Well if you have LV 8.x you have the property browser/searcher (ctrl-shift-B on windows)

    This is searchable per structure so you could have found it there.

    What I normally do is just browse the properties of the structure I want to change, be aware that in the case of clusters you need to get the clustere elements (like Ben showed), in the case of arrays you need to the element type, but be aware that anything you do on the element type will infect the whole array.

    Ton

  13. I need to add new events to a previously defined event registration refnum, a task that's starting to seem impossible :( .

    Well, in fact I've managed to add two event refnums (from their typedesc, plus some scripting, etc). It works, but... the new event registration refnum, though it has the correct structure, it doesn't have specific controls registered on it (of course), so the events never trigger.

    I don't really understand what you want to do, but I take the snippet is a 'little sample'

    If you have an event registration refnum, you can expand it by just dragging down. But if you pass it around between VI's you will get problems. The best to do in that case is create a td. control containing the event registration refnum.

    Now the event registration refnum is just a container with specific events for specific control types. You have to fill it with control references to get the event node react on!

    Look at the following snippet:

    post-2399-1163608026.png?width=400

    I first created the two event registration node, boolean and boolean ref. Then connected the two event registration nodes.

    Created a boolean typedef constant, connected it and set an event.

    Connected the boolean ref to the second node.

    Now the moment I add something to first node the second will follow.

    If I don't give an input to the second node, the container will hold the values from the first event node.

    Hope this helps

    Ton

  14. First of all I don't knwo the 6122.

    But for this kind of acquisition (1 analog and 2 digital) I'd use a 'normal' M-series daq card (6221 too slow, 6251 will do)

    Set the clock timing source of the digital input (on port 0 for timed input) to 'Analog sample clock' rising edge.

    For the analog input set the trigger start to a PFI-line which has the digital trigger.

    Make sure you start all the tasks before the digital trigger arrives.

    Now when the trigger arrives the sample clock of the Analog input will start, and thus will start the digital input!

    Show your code!

    Ton

×
×
  • Create New...

Important Information

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