Jump to content

jpdrolet

Members
  • Posts

    367
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by jpdrolet

  1. Last week I had to interface an application with a game controller. The funny part is that it uses the joystick buttons to select a target region with the cursors of a graph, Up/Down arrows to select the power and the buttons to trigger a real laser. The goal of the "game" is to flatten those nasty bumps in the transmission curve of a fiber grating by selectively laser heating offensive regions. The need arose from the fact that the application required a lot of mouse clicks (place cursors on target, set power, shoot; many tens of time) and there was a shortage of valid wrists to operate. I did already provided few keyboard shortcuts but it was not enough. The integration of the game controller was relatively easy. I plug the USB device and the Joystick VIs worked immediatly. I wrote a Joystick monitor to poll it and generate value change user events for buttons and controls. These were catched in the user event loop of the application to programmatically move cursors or signaling actual FP controls. While the joystick provides integer values ±32000 for the position, I noticed that it didn't always come back to the same idle position, with errrors up to 3000 counts in position. Is that a common behavior for game controllers of are come controllers are better than others?
  2. QUOTE (Jim Kring @ May 8 2008, 05:14 PM) Is that your computer screen that I see in the upper left window? Still on CRT?
  3. LAVA: Flaming Homework Hustlers since 2002
  4. QUOTE (Harvey @ May 1 2008, 12:29 PM) No. The example that you gave can't work unlless you make the modification I suggested. You have flattened a 2D array of variants so you have to unflatten a 2D array of variants after reception.
  5. QUOTE (Harvey @ May 1 2008, 11:31 AM) OK. Intead of using the TD of the void variant(after TCPIP reception), take the TD of a 2D array of variants. You could also use "Unflatten from String" with a 2D array of variants as type to make the converion in a single step. For the conversion to cluster inside the loop, take my previous example for the cluster.
  6. If I understand correctly, here is how to convert to data, assuming a single type per column:
  7. QUOTE (Amelia @ Apr 30 2008, 03:02 PM) Put another top-level VI in your application, like a splash screen. As soon as a VI has its window opened, the load window won't appear even if the application is not fully loaded yet.
  8. QUOTE (orko @ Apr 21 2008, 02:33 PM) Yeah that's cheap. Try the http://www.pearcable.com/sub_products_anjou_sc.htm' rel='nofollow' target="_blank">Pear Cables.
  9. QUOTE (Bonagel @ Apr 21 2008, 10:01 AM) That is exactly what the post code does. The variant element cluster is accessible directly with its attributes after the Variant To Data conversion. To unwrap a variant[variant], use Variant to Data with a variant for type input. Can you explain if you need something else?
  10. QUOTE (Bonagel @ Apr 21 2008, 03:00 AM) You don't need to modify OpenG VIs as they work as intended. You just need to wrap the variant element into a variant: http://lavag.org/old_files/monthly_04_2008/post-447-1208784179.png' target="_blank"> That is required since LVdata VIs work on the content of the variant on input.
  11. Ha! that is a different story and I did see it coming. There is a subtlety here that I'll try to explain. What the VI does is to assign the content of the incoming variant to the cluster element. Still the content is an integer (without attributes) and it is assigned to the variant cluster element. See the content of output cluster: first element is an empty variant and second element is an integer, not a variant thus no attributes. You have changed the type of the cluster from {Variant,Variant} to {Variant,Integer}. Now if you use Variant to Data to convert the variant to the original typed cluster, it will work because it allows the conversion of an integer to a variant. Now what you have to do is to insert another To Variant node to wrap the variant into a variant so the VI handles the input content as a variant and keep its attributes. Be careful that the name of the embedded variant is set correctly or use that name input.
  12. QUOTE (Bonagel @ Apr 17 2008, 12:16 PM) If you want an element of a cluster to have attributes, the only way is to make the element a variant. Variant and waveform are the only datatypes that can have attributes. Here you have a cluster with two integers which can't have attributes.
  13. I've noticed 13 passes, one moonwalking bear and three naked women. Not sure for the bear...
  14. For those of you that keep an eye on the Intelligent Design/Evolution debate: Actually the satirical clip is a controversy by itself: some people think it is pro-science and other think it is pro-ID. Personnally I think it is an irreverent hommage to the cast, all active advocates of science. That is related to the upcoming movie: Expelled
  15. I think a solution to avoid this would be that LabVIEW keeps VI files opened (deny write) while they are in memory. That effectively locks the file in the filesystem. Many applications do that. Are there better reasons for not doing so in LabVIEW?
  16. Sorry, I own that patent Give me all your money!
  17. QUOTE(Randy @ Jan 3 2008, 01:53 PM) The VI Name property refers to the VI file name on disk and can't be set in run-time because an app can't save a VI Try FP.Title instead to change the ttile of the window.
  18. QUOTE(alfa @ Dec 27 2007, 03:18 AM) WHERE AM I? I found the answer: P = (x,y,z)
  19. QUOTE(Aristos Queue @ Nov 4 2007, 04:03 PM) I'm nitpicking here but NaN!=NaN is actually True. One trick uses the fact that NaNs generated by LabVIEW are always represented as 0xFFFFFFFF (-NaN). However NaN has many representations and 0x7FFFFFFF(+NaN) is another one. If you put +NaN as the default value of your control, you can still detect if the subVI is wired and receives a generic NaN (-NaN) or if it was unwired (+NaN). You detect which NaN using the flattened string. The trick still have its limitations since if the connection is made using "Create a constant/control", that constant/control will take the deafault value which is the one used for wire detection.
  20. QUOTE(tcplomp @ Nov 2 2007, 01:44 AM) The number of pixels is a I16. A max of 32767 pixels is a small diagram...
  21. try to put cd /D %0\.. as the first line to make sure that the working folder is the same as the batch file Also on not every system are the vbs directly executable so you start it with wscript.exe register.vbs
  22. QUOTE(gleichman @ Oct 18 2007, 10:00 PM) Not quite... Remember? http://lavag.org/old_files/monthly_10_2007/post-447-1192799561.png' target="_blank">
  23. QUOTE(crelf @ Oct 17 2007, 10:58 AM) I think it is http://en.wikipedia.org/wiki/G-code' target="_blank">G-code
  24. The JAVA Run-Time is 119MB and Internet users have to download updates regularly so I don't think that size is such a big issue. I'd like to see : LabVIEW files formats to become an XML Open Standard so that everybody can make Edit/Display tools or even compilers. Release patents for graphical programming. There is no more reason to patent graphical programming than text programming. These slow growth and innovation. Make a LabVIEW Light version, without the heavy stuff for data acquisition. Keep Serial and TCP/UDP and some common protocols. Promote the parallel capabilities available for years and ready for multicore That openness would keep Microsoft from embracing graphical programming and setting its own closed standards.
  25. That's quite entertaining indeed. Is that Christopher Walken?
×
×
  • Create New...

Important Information

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