Jump to content

bariman8

Members
  • Posts

    14
  • Joined

  • Last visited

bariman8's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. James, Since you are programming in labview real time. The best solution to this problem is to make your time critical loop a hardware timed single scan. In Labview Real time this is where your power comes from. Basically you setup a non buffered single scan which controls the timing of your loop, you then read the iteration counter to determine how much time has passed. Your resolution of your count then lies solely on how fast you run that loop minus the slop from the hardware crystal oscillator on the daq board (which is minimal). Derek Lewis
  2. Very Interesting Jim, I definitely need to look into GOOP design. Do you know of any good websites out there that explain GOOP and its functionality? I downloaded the OpenG GOOP toolkit but a lot of it doesn't make sense to me. Thanks, Derek Lewis
  3. Jim, On a recent project I designed a CAN "server" that would actually spawn new engines for each CAN card configured using a configuration tool. Each engine would be initialized with User event references to hook into any main program. The engine would then take care of sending/receiving event driven messages or periodic messaging. I have to say that Michael Aivaliotis' NI week presentation opened up my eyes to this new idea in coding style. I think my next foray will be into the wonderful world of GOOP :beer: Derek Lewis
  4. Mike, The code that's in there can do some very primitive control generation. The problem is if you want a complex control, i.e. a cluster of different types, this becomes a hassle. If you look at the Generate New Global VI.vi block diagram towards the left of that VI you'll see a new labview primitive named "New VI Object". The control type input on that indicates what type of control you want to create; string, numeric, etc. It uses that as an input UNLESS you have a typedef path input connected. Therefore for my global generation code to work it actually iterates on a directory of typedefs and creates a control based on that typedef in the VI template for an old global. After hooking up wires to the shift registers it then calls an invoke node for Create indicator just as you would in labview. After all of that is complete it hooks up the control and indicator to the connector pane. I hope that helps to explain how it all goes together. Cheers, :beer: Derek Lewis
  5. Hello all, Sorry for responding to this post so late. Been a busy end of the year. I've attached the old global generation VI to this post. Some things to note : Be sure to point the path to the old global template.vi wherever it resides on your pc. The code is quite messy as it was one of my first forays into scripting and I coded it pretty fast and not well documented . Also there is a bug that I never could figure out where occasionally a new control would be created outside the loop and that messed everything up. This is why the loop size is so large to increase the chances that wouldn't happen. Enjoy and feel free to ask questions if I can remember how all of it works :thumbup: Derek Lewis Download File:post-620-1104841137.zip
  6. Hi mikrobi, The register for event callback does not work in the way you are intending it to work. U see in your image there is a input called VI ref. Right click on the register for event callback function and select create callback VI (I think that's what it's called). From here you can program a VI that will handle the event that you are registering every time that event occurs. In other words the register event callback VI waits for an activeX event and on that event it will call that VI that you wire the reference into there. I hope this helps because initially I had problems with this as well, Derek Lewis Wineman Technology
  7. Jim, Thanks for the help. I figured out the problem that I was having. I did not know that there was a property node for VI:Control VI Type. Once I found that property I could change the control type to a strict typedef. I finished a VI that iterates through a directory and creates the USR (uninitialized shift registers) style globals automatically based on the controls found in that directory. If you're interested I can upload it here. Thanks for the help. Derek Lewis Wineman Technology
  8. Thanks PJM, The problem that i was seeing was that I currently had labview 7.1 installed and could not access those functions unfortunately. However, someone helped me out in that area . I ended up creating an automatic old style global creation vi. I tend to use old style globals quite often since I have heard they are more efficient and I program in Labview RT and FPGA quite often where those few precious microseconds make all the difference. If anyone is interested in the VI I would be more than happy to post it. In addition, I have had a few ideas floating around in my head regarding some keyboard shortcuts that I would like to see implemented and have been thinking about coding these up and offering them to the OpenG team. If anyone has any suggestions or wish lists about what they would like to see please let me know. Cheers, :beer: Derek Lewis Project Engineer Wineman Technology P.S. Sorry if these comments are off topic
  9. Jim, I think I understand what you're saying however the problem that I'm running across is that basically I want to create a control once using it as a template to save typedefs off of. From there I then can iterate creating and saving new typedefs off of that one template control but changing labels and stuff like that. After that is complete, I made a VI that can make an old style global vi using each of those typedefs as the input and output. I hope that made sense Derek Lewis
  10. Hi Everyone, :question: I've got another question. Is it possible to create a typedef or strict typedef using the New VI object and New VI function. I've been able to create a control vi but I haven't been able to change it to a typedef or strict typedef control. Thanks for the help, Derek Lewis
  11. Hi Mikrobi, I'm not entirely sure if I understand what you're trying to accomplish but I believe it sounds like you want each event to occur based on different controls. If this is the case all you need to do is pass the dynamic event refnum into another register for events function. Then pass the refnum of each control you want to associate with that event. From there the event handler should take care of the rest. Good luck, Derek Lewis
  12. Didn't know you wanted to change it at run mode... sorry for the misunderstanding. Derek Lewis
  13. Hey Mikrobi, You can change the name of the events. The key is to change the name of the refnum that you are passing into the Register for Events primitive. However, if you're using the same subvi to pass that reference out that makes it a little tougher, but still possible. Derek Lewis
  14. Hi everyone, I'm glad someone mentioned this website to me because in the past few days I've learned so much regarding this labview scripting technology and my head is spinning with new ideas. I'm currently trying to create an automated Old style global generation vi. I'm fairly close with the information I've gained on this website. :question: My question is whether it's possible to gain access programmatically to the connector pane. I'm programmatically generating my variable control and my variable indicator but I just can't figure out how to get them connected to the connector pane. Anyone have any ideas or suggestions? So far I've tested that I'm able to create a new control (string, boolean, numeric, even typedefs) and then create its indicator on the outside of the shift register. I also can programmatically wire all of these into the correct spot. It's just that darn connector pane. Thanks for the help in advance, Derek Lewis
×
×
  • Create New...

Important Information

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