Jump to content

CraigGraham

Members
  • Posts

    49
  • Joined

  • Last visited

Everything posted by CraigGraham

  1. Is anyone aware of such a beastie to do math on arbitrarily long integers?
  2. Well, Irene's post IS using the standard Win API. I can't get yours to work. It's correctly getting a win refnum but the return from getWindowLong is zero, which I guess is not right. You're using a sequence unnecessarily; frame 1 is dependent on frame 0 and the code can be in the same frame because dataflow will ensure it works in the right sequence. It may not matter which order the second two function calls take place in either. Sequences with sequence locals and wires backtracking across each other is a pain, IMHO.
  3. I'm in the habit of using queues and occurrences to communicate between different parts of an app- typically just using a handful of occurrences for simple things such as shutdown (since if a VI reads an occurrence for this it's much more portable than if it reads a global). One advantage of events is that they are non-polling. I've always assumed this has always applied to occurrences and queues. Does anyone know for sure that these are non-polling? If not, user defined events may now be a better option.
  4. The rectangular Boolean controls have properties to retrieve the width and height of the button inside the bounding box. However there seem to be no properties to determine the absolute position of the button regardless of the position of labels, captions and decals which can extend the bounding box and change the origin of the control, hence its apparent position in the window. Does anyone know of a way around this aside from either; 1) Creating the labels and pictures as seperate entities, hassle but easy, 2) Assuming the button's bottom right corner will always be aligned with the bottom right of the bounding box- slightly dangerous if a variable length caption is used, but a caption so long it overhangs the control looks a bit cacky anyway and I'd tend to avoid that.
  5. Now I know what my "wow" memory was- it was the ability to add code to custom probes! So I guess the ability to add code to custom controls isn't a huge distance away.
  6. You just do it again with a different number. And never again try something like this for the first time with a value of zero on the only LV window you've got.
  7. I had the same symptoms a while ago that turned out to be caused by a second event structure in a case structure. Although the second event structure never executed, it still interfered with the event queue. Just use a single event structure and use a shift register to buffer the state of the mouse button.
  8. There are two ways. Neither is easy. The first is to use the DLL. Labview has functions ("Call Library") to allow you to call library functions from DLLs. The second is to ignore the DLL and as someone said to use the serial port primitives to make your own driver. This is more work, but the work is easier and more understandable- and you'll know more when you've finished and have a happy warm glow that you won't get by plugging in a black box DLL that will keep crapping out on you The very first thing you should do if you play directly with it using the serial port is to use a serial terminal program like Hyperterminal to talk to the instrument, sending commands from the manual and getting responses back. Until you have achieved this, messing about with the serial port primitives will be futile and frustrating. Once you can talk directly, you learn what commands you need to be able to do what you want with it, and then start writing Labview code to do those commands for you and you're there. To appease my boss, I should say that there is of course the third option of contracting an NI Alliance Integrator to do it for you. There's plenty on here.
  9. Neat. Surely someone's already done this for IT training? I'd have thought someone with a laptop and projector teaching a class would already have been doing this but I've never looked. Might also be an easy way of overlaying static or animated illustrations on video footage; Powerpoint NextGen. We did a project once where we were just scripting video and monitoring the reactions of the viewers. The psychology researchers who contracted us had edited the videos to obscure, for example, the eyes, to observe the effect of reduced information. That would have been a much better system with this to allow them to modify the footage on the fly.
  10. Cool. We can now do arbitrarily-shaped splash screens that fade into view over a second or so. I've been meaning to do that ever since I got .NET but never had the time/motivation/justification. And I have a big oval with the word "BOO!" in it that occasionally fades in at a random place on the screen and then fades out again. So is there a real use you had for this?
  11. I overlapped with this post, I think. In this case, the two buttons are mutually exclusive aspects of the same entity. I'm planning some indication of which is inbound and which is outbound as you suggest, but it's obviously meaningless to try and press both together by pressing the icon and I don't think anyone would complain about that. Where there're not mutually exclusive, I agree that the behaviour you describe would be an intuitive way of carrying out a group action. Splitting the icon in two and having a crack would have the advantage that editing and alignment are less critical, but given I can't edit the things it's a moot point.
  12. I wasn't planning on doing any more with this till next week but.. I'm again thinking the transparent picture overlay will be the easier option. I've never really figured out the details of importing bitmaps with a transparent colour. The chart on my panel is essentially cut+pasted from Visio, so it looks the same as a diagram I did in the spec, and Visio's objects come in correctly. However, if I paste from Visio to Corel Photo Paint, I get a bitmap that I can edit, and the edited object does have transparency in Corel, but when it's pasted back to Labview I lose the transparency. I can create drawings in Corel Draw and paste them into Labview correctly, but cannot get my existing graphics into Corel Draw as anything other than bitmaps, and the bitmaps will not then correctly cut+paste. Since my drawing skills are pathetic, I can probably code this up quicker than I can draw new graphics from scratch.
  13. That's what I've done, but it's irritating. I have to feed in a reference to the picture ring, a reference to a control boolean hidden next to the picture and a reference to the stop button and just launch the thing off to one side. I wanted an "animated boolean"- static image when false and an animated image when true. Easy enough with a picture ring, but it would have been nice to be able to feed a boolean into a custom control and have a loop in the custom control cycling through the images in the true state. Always annoying when my memory starts playing tricks.
  14. Items flowing through the system can be "inbound" or "outbound" at any particular point. Originally this worked by specifying the location on the chart and then selecting the direction. It now has to be changed to two buttons for each location to allow both location and direction to be determined by a single click. The simple approach may be best as you say. I just prefer to mess with code than do tedious stuff with graphics packages- especially as I have the ongoing irritation that I can't seem to be able to remove a decal from a control. I'll have a crack at simple image editing and see what the result is like next time I get back to this.
  15. In conjunction with bundle/unbundle by name everywhere, yes.
  16. I'm doing a custom control in which it would be useful if I could add code. I know we never had this ability before 7, but when the need arose I had a flash back to when I first started to play with Labview 7 and at the time I had a "wow" moment where I thought I could actually do this. Am I going mad?
  17. Does anyone know of a PGP toolkit for Labview? Has to be licensable so it can be used in a commercial, closed source app.
  18. I have a panel showing a flowchart, where the nodes are Booleans with decals. I now want to change the nodes into dual Booleans- one on the left, one on the right as in the picture. The decal and labels have to remain and be centered. The problem with simply adding a new Boolean and offsetting the decal is that clicking on the decal triggers the bool associated with the decal, and not the bool that is actually under the mouse. I see two solutions. The simplest but (in the long term) biggest pain in the arse is to split the decal and have one half on each boolean, manually aligning them for each node. The more elegant is to put a transparent picture control over the top and have a sub-VI that grabs click events and triggers the appropriate button. Nicely out of the way and reusable. The second option seems like a sledgehammer to crack a nut though. Although I know I can do it, I can't help feeling there must be a simpler and more efficient way than essentially ditching the existing mechanism for handling panel events and using my own. So does anyone have a third suggestion before I go ahead with it? Hmm. This should be in the "User Interface" bit but I can't see any way of fixing it now I've submitted the post. Apologies.
  19. I always use clusters for the queue elements and haven't had any problems aside from transient idiocy on my part. Are you using strict typedefs for your clusters?
  20. Well, the list seems to be down again so I'm back on here. ISTR Tom C left Labview years ago and is only hosting this list for historical reasons. Mailing out from the board to an email list would be easy- perhaps with checkboxes next to forums so users don't get all of the mails sent. Replying would be easy. I don't see a way of creating a new forum post via email. Not conveniently enough that people would use it and board admins would end up having to move every new thread originated on the mailing list into the correct forum. Not good for long term. When I say "easy" of course, I mean conceptually. There's a place for a forum-based and mailing list-based *interface* to the same pool of knowledge, but having the two seperated dilutes the usefulness. I see names on here that I recognise from the list, but there must be people who are only on one.
  21. Simplest may be to turn your VB code into an ActiveX control and embed it in a container in a Labview VI. I know this can be done with VB6, I've not tried in .NET More complex would be to use TCP or DDE to set up a "point to point" comms link between the two applications. Or you could set your VB app in such a way that Labview can communicate with it via ActiveX without embedding- as we can communicate with Word and Excel for example. I have no idea how to write something in VB to do that.
  22. Ah. The problem was that to test this, I first put the window move loop in the top level VI to get things working. I then copied it to a sub-VI and wrapped the original in a case structure, so I could switch between the sub-VI and the code in the top level. It turns out that having the event structure on the top level, even though the frame wasn't executed, screwed up the sub VI. Pretty straightforward- I forgot all about it because it wasn't visible.
  23. What I'm doing is pretty much as described and I can't see what's going wrong. I've attached a block diagram of the simplest case. I call this diagram from a parent VI, whose only function is to get a VI ref and call this VI with it. The numeric I've shoved in there, and the coordinate indicator, show that the sub VI gets precisely one mouse move event when I move the mouse over the calling VI's window. After that, the event structure never fires. If a timeout is specified, the event structure simply keeps timing out and executing the timeout frame, which confirms that the while loop or the VI itself are not bailing out for some reason.
  24. Since info-labview appears to be down again, I may as well try here. I've done a bit of code that lets the user drag a frameless VI about the screen by clicking+dragging on the inert parts of the panel. It's a fairly big and self contained while loop that would be better off in a sub-VI, but I can't figure out how to register the event structure in the sub-VI for events from the calling VI. I've tried a few things that look sensible but the events never get fired. Has anyone managed this?
×
×
  • Create New...

Important Information

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