Jump to content

MartinMcD

Members
  • Posts

    150
  • Joined

  • Last visited

Everything posted by MartinMcD

  1. Hi Felix, Thank you for the response. I'm not sure what IPE and DVR stand for, please could you fill me in. Thanks, Martin I think I should be reading this: http://lavag.org/topic/10666-labview-oop-by-ref/page__st__40 In Place Element structure and Data Value Reference. I'm off & away, thanks for the tip.
  2. Hello there everyone, I fear this is a newbie-to-oop question but if you can spare me a minute it would be much appreciated. Is it okay/good/bad to use a single-element-queue to contain an instance of a class object? And to use this to allow two bits of my application to set&get various class properties. I have a daqSettings class which lists currently used channels. I have a separate front panel (part of a windowManager class) which allows the user to change channel settings. This window needs to initialise itself with the current channel settings and then set the updated settings for the daq class to use. Thank you for any advice you can spare. Regards, Martin
  3. Cool, thanks for that. That method is working really nicely with ASCII encoding, the unicode seems a bit tricky still.
  4. Mmm, thanks for that. I was hoping to have an ini file with the required contents of string controls in different languages, like this: [ctrlOne] jp=種類の音を与えます en=hello It becomes quite tricky it seems... I'll keep trying & post back if I figure it out. I do have the modification to the labview .ini file that lets me view unicode characters in string controls so it is searching/extracting from the file that is the tricky part now. Where there's a will there's a way and all that...
  5. Hi there, I'm having exactly the same problem as this - I have created a .ini file and saved it in notepad as unicode format. When I try and read the file using the config file vis the section and key names aren't found. I've tried with and without the use of the str-utf16 vis that are included here. I can read a 'normal' ascii ini file fine. Has anyone experienced anything similar? Thanks, Martin
  6. Ahh, I missed a step - what I had wanted to do was call a daq class method in the child window when the window is first opened called 'getAccelerometerLocations' which would read the value from a class property. But that is what I don't think I can do because I can't call a class method from here which has access to the class data. Because of this I'm left with the idea of calling a basic subvi which doesn't have access to the class data but is a part of the class - I kind of half way house of encapsulating the knowledge of how to extract channel property info within the daw class.
  7. Hello there, Wow, thank you all for the help and advice, I really appreciate it. I can now upload a few pictures to show you my implementation in case it is of interest. It is still very early days at the moment but it shows what I'm doing. This is my main front panel with just a couple of child windows open for demonstration. From the menu bar the user can select to have multiple live views of the data (bar charts, fft etc) and they can also take a defined measurement - as in the fft window shown. These are child windows to the parent. The DAQ loop sits on the block diagram of the main front panel. It grabs a bit of data from the active devices and sends it out to a notifier and lossy queue. This is the implementation of a child window - live or measurement. The bottom loops sits there just grabbing data from the queue/notifier and sends a section of it to an xControl to be plotted/saved etc. When the panel is closed the child windows fires off an event to report back its own reference and the window bounds so that the childWindowManager class knows where to open it next time. It probably looks pretty basic to you guys but I'm really happy with it so far - I'm still learning quite fast but it is proving to be nice and modular - it is dead straight forward to add another analysis technique for example, and the complexity of the analysis can be contained nicely within the xControl. The bit I was originally asking about was where in the child window I do the index array to extract just the elements that I am interested in (the accelerometer data for example) to send to the xControl. As this is happening ~5 times a second and there's a lot of data, and as I can assume that the active devices list will change only at startup I did not want to invest too much time in checking the attributes of the waveform array on each loop. I had initially thought about having a subvi which would be called to get the index and length of the part of the array that contains 'accelerometer' in the NI_ChannelName property for example, but it seems like a lot of work to do on each loop. I had thought about splitting the waveform array into three queues - microphone data, accelerometer data etc but then there is the overhead in doing this and it means the daq class is then kind of assuming how the data should be split up - Order Tracking analysis will require the tacho and the accelerometer for example so that child window would then end up waiting on two queues and checking time stamps which would also be messy. I've left it to the child window to decide what data it needs for its own analysis. At the moment I am thinking of using the 'on first call' boolean so that when the child window is first opened the first bit of data from the queue is taken and the attributes are searched to extract the start index and length for that sensor type and then these values are used in subsequent loops. I think this is the way that I will go but that to me sounds like a method which should be a part of the daq class but is it bad practice to have a class method without the class wires going in & out? (I wouldn't need access to the class data so I don't need them). Thank you again for the help. I will re-read your comments again at work to make sure I fully understand everything but I wanted to post these pictures before I get stuck behind my work firewall. Regards, Martin
  8. Hello there, I have written a modular data acquisition & analysis tool. I have a class responsible for reading data and spitting it out onto a queue as a waveform array. The contents of the array depends on which channels are being logged - one time there might be 4 pressure and 8 accelerometer and another time 4 accelerometer and 2 pressure. Now, to get me started I just assumed that I always had the same channels in the waveform array, so my pressure analysis module knew that it needed to get elements 4,5 and 6 from the array for example. But, I now what to add the ability for the analysis modules to be told by the daq class where the data is. I know that each analysis module could do it by looking at the NIChannelName property for each element in the waveform array but that has its own issues. I could have an FGV which the daq class writes to (number of channels, locations) and the modules read from. But I was wondering if there is a way I can get these modules access to the daq class data method readChannelPositions(). I think the problem I've come up against is that the modules don't have a reference to the class and I can't pass a wire in to them. I guess this is what people refer to as by-reference versus by-value? Are there any helpful tips you can offer please? It would be much appreciated. Thanks, Martin
  9. Doh! I can be pretty forgetful...
  10. Sweeeet! That is fantastic thanks so much. Best regards, Martin
  11. Hello there, I have set a splash screen as the startup vi in an application. The splash screen then launches the main application window with a vi server call. Once the main application has loaded in generates a user event which the splash screen picks up and so closes itself down using a Front Panel.Close call. When I am working with the development environment and not the built executable it all works fine. However, when run from the build exe, it still works but now I end up with two icons called 'Prog X' on my start bar which looks a bit rubbish. I can sort of see the reason I think - in the built version the splash and main app windows both have the same title which is the application name, when in the dev environment they have different names. It seems that Windows can't figure out what to do. Due to our firewall I can't upload images to the site, from my explanation does anyone have any ideas or has anyone come across anything similar? Thanks very much, Martin
  12. François that's fantastic, thanks so much. Regards, Martin
  13. Hello there, I'd like to use a 'Save as type' option in a file dialog so a user can choose to save data out as csv, tdm, matlab etc. I can't find an option for doing this, can anyone help please? I could get around it by having different menu options 'Save as Excel', 'Save as Matlab' etc but doing it in the file dialog and then handling the selection is a more elegant option as far as I can see. Does anyone know if there is an inbuilt option for doing this? I don't really want to get into writing the code for a file dialog box. Thanks, Martin
  14. Hello there, I'm plotting a bar graph to show the rms level of 4 accelerometers. At the moment I am using an XY-graph which means my bars are positioned at 1,2,3,4 on the x axis. This is okay but I would like to change the display on the x axis from a numeric to a text label. In Matlab I'd use the edit tick'label command for example. Does anyone know if this is possible please? Also, is it possible to do a clustered bar graph where for each plot/series the columns for a particular x value are clustered together. Thanks, Martin
  15. HI JG, Thank you for the reply. I can't get an image past our firewall here at work which is something of a pain but I will post from home tonight. I am using several xControls but they are quite 'dumb' and just plot data that I send to them - they shouldn't have anything to do with my locked class, apart from the notifier reference that they use to share info. It does sound like I might have a reference to something still open then but I have restarted the machine several times. I'll keep investigating... Thank you, Martin
  16. Hello there, I am having this problem too but I haven't been able to sort it - can anyone help please? I have a class which is only included in one project. When I click on the 'why is it locked' option I'm told: A vi in the library is reserved in this application instance or another application instance. It's driving me nuts today! Thank you, Martin
  17. Hello there, I was wondering whether tdms is restricted to file->group->channel or whether it is possible to nest groups - ie file->group>subgroup->channel. Thank you, Martin
  18. I certainly will do, it'd be nice to actually contribute something rather than list my endless list of questions...
  19. Thanks for that, I had already installed it but I'd missed the fact that there was a system cluster there. The mixed signal graph would be really handy to finish things off.
  20. Hi again, I was wondering if there is a 'system' style version of the mixed signal graph in existence, and/or a system cluster. Also, can anyone point me towards some info on how to go about doing this myself? I know how to customise a control but the options I have seem quite limited, I think I must be missing something. Thank you, Martin
  21. Fantastic, exactly what I was looking for - thank you.
  22. Thank you both for the advice, that's great - much appreciated, Cheers, Martin
  23. Hi all, I have a tab control where each page contains a plot. I can set the tab control to scale with the pane but then the graphs don't scale with the changing size of the tab control. Alternatively if I have just one plot (and no tab control) I can set that plot to scale to the frame. Is there a way that I can set a graph to scale to the changing size of the tab control? I guess I could do it manually but I was hoping there was an inbuilt way. Thanks, Martin
  24. Hello everyone, Before I go off and create my own, I was wondering if there was a facility in Labview to be notified when a particular DAQ device is either plugged in or removed from a computer. I know how to find out what devices are attached and I can keep polling this list, and even trigger a user event if necessary etc etc - I just wondered if there is a built in way of doing it. Thanks very much, Martin
×
×
  • Create New...

Important Information

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