Jump to content

ned

Members
  • Posts

    571
  • Joined

  • Last visited

  • Days Won

    14

Everything posted by ned

  1. QUOTE (NeilA @ Oct 15 2008, 12:44 PM) Without a lot of information about what you're doing, here's my suggestion: use your queue-based system, and allow the web service to insert items into your queue. You can do this by creating a VI that executes in the same instance as your test executive that simply obtains a reference to the queue (named queues make this easier), places an item into it, and then releases the queue reference. Enable VI server and allow access to that VI. In your web method, open a reference to that VI through VI server and run that VI by reference, passing it whatever values need to be inserted into the queue. You may have to experiment with VI server for a while to get this to work - I suggest enabling TCP/IP specifically for your project (right-click on My Computer in the project explorer) and assigning it a unique port.
  2. QUOTE (NeilA @ Oct 15 2008, 11:42 AM) Hi Neil - NI doesn't make this as clear as they could in their documentation, but a web service VI executes independently of other VIs. For example, if you build a web service into an executable, you'll have one VI that runs as your application (in your case, the "executive") and another web method VI, and even though they're part of the same application they run separately. You'll need to implement the communication mechanism between the two of them yourself, using shared variables, VI server, shared files, etc. I don't understand exactly what you meant by "the VI doesn't seem to execute it just executes the method called" but if you provide a more detailed explanation or screenshots of your code, someone here can probably help you determine the best way to set this up.
  3. QUOTE (Val Brown @ Oct 13 2008, 02:41 AM) I've seen this behavior before. For some reason the WebBrowser2 component remembers the most recent location and attempts to navigate to it the next time the VI is opened. Worse, it's difficult to change this URL because as far as I can tell the location only saves when you save some other change to the VI. Try this: force the web browser to connect to about:blank when the VI ends, make another trivial change to the VI, then save it.
  4. QUOTE (HChandler @ Oct 3 2008, 01:37 PM) Convert your enumeration to a variant and pass that in. Use the Variant library (vi.lib\Utility\VariantDataType\VariantType.lvlib) functions to get the strings for that enumeration. The specific VI you want is probably GetNumericInfo.
  5. This is not a bug, it's a longstanding quirk in the way rings work. If you search through the Info-LabVIEW archives or NI Forums you'll find multiple explanations - try searching for strict typedef ring. In general your strict type definitions should always be enumerations, not rings. EDIT: added this link from Info-LabVIEW which is the most thorough explanation I've seen. http://sthmac.magnet.fsu.edu/infolabview/I...-10-26_015.html
  6. I haven't used that brand of USB-CAN adapters, but it's likely that NI-CAN only supports NI cards (and perhaps a few others). For other brands such as yours you'll need to use whatever the manufacturer provides, such as a DLL or an ActiveX or .NET component. I've used Kvaser CAN equipment, and it too is not recognized by NI-CAN, but I've had no problems using it in LabVIEW by calling the DLLs that Kvaser supplies.
  7. QUOTE (jlokanis @ Sep 23 2008, 08:12 PM) Set your <CR> button to both toggle and set focus. The combo box value doesn't update until it loses focus, and hitting <CR> isn't causing the combo box to lose focus, so the value doesn't update.
  8. QUOTE (FLAnatic @ Sep 18 2008, 10:03 AM) This looks like someone's workaround to a problem they were seeing because they couldn't (or didn't) find the root cause. Since this code uses named queues, it appears to ensure that there is not an existing, conflicting queue with the same name by attempting to get a reference to a queue with that name and then destroying it.
  9. QUOTE (ExpoEra @ Sep 9 2008, 11:32 AM) Looks like this got http://forums.ni.com/ni/board/message?board.id=170&thread.id=353884' target="_blank">resolved. In the future, please provide a link to other forums where you've posted the same question.
  10. QUOTE (ExpoEra @ Sep 8 2008, 08:23 PM) Are you trying to open a reference to a subVI, or to the top-level VI? I don't think you'll be able to open a reference to a subVI if you've only compiled the top-level VI. Are you loading the appropriate VI into the FPGA and running it? Have you probed the error outputs from the Open Reference, Read/Write, etc functions, and if so, what error occurs?
  11. QUOTE (Muhammad Jawad @ Aug 28 2008, 08:46 AM) The G web server does not support CGI on RT targets such as the FP2010, as described here: http://zone.ni.com/reference/en-XX/help/37...unsupportedets/. You may want to look into the new Web Services features available in LabVIEW 8.6.
  12. QUOTE (george seifert @ Aug 7 2008, 12:10 PM) I've only taken a quick cursory look at your VI, but a better approach would probably be to remove the while loops from inside your event cases, and instead use a shift register in the outer loop to build up your string each time a key down event occurs, until you reach the termination character.
  13. For those of us not on the bleeding edge, any chance of getting it in an earlier version of LabVIEW (it's in 8.6)?
  14. QUOTE (Xrockyman @ Jul 31 2008, 09:54 AM) You could place the control on top of the tab, rather than within it, and then it would be visible on all tabs. If you need to hide it for some tabs, you can use the "Visible" property to hide it only when necessary. Another approach would be to use two tab controls; a large one containing the common items, and a smaller one with the individual tabs. Place the smaller one in front of, and on top of, the larger one. Hide the tabs for the larger, background one, so it looks like there's only one tab control (you might need to play with colors and transparency, but it's probably doable). Make the larger background one an indicator, and set its value based on the value of the front one.
  15. This one is pretty minor but I run across it regularly: on a block diagram, when I right click on a "Compound Arithmetic" primitive and navigate to the "Replace" menu the options are "Numeric Palette" and "All Palettes" even though the wires running into the node are booleans. Can we have a shortcut to the boolean palette there too?
  16. QUOTE (ragglefrock @ Jul 28 2008, 02:04 PM) While this is annoying, you can (at least in my opinion) partly solve this by taking advantage of the fact that pasting a front panel object while an object on the front panel is selected causes the selected item to be replaced, leaving the connector pane wiring intact. So, if I have an array control and want a scalar, I'll drag (or control-drag, for a copy) the item out of the array control, cut it, select my array control, and paste. What I don't understand is why you can't do this for block diagram constants - on the block diagram, paste places a new object rather than replacing the selected one.
  17. ned

    Linear Actuator

    QUOTE (Hansell @ Jul 22 2008, 01:09 PM) Try http://www.copleymotion.com/' rel='nofollow' target="_blank">Copley Motion? I've been controlling their stepper motor amplifiers through LabVIEW (they provide a free ActiveX component and LabVIEW examples). They work well in my application and were simple to set up. I haven't used their linear actuators but I'm willing to guess that they're equally easy to use.
  18. QUOTE (normandinf @ Jul 4 2008, 01:46 PM) Here in Boston many people move on September 1st since that's the day most leases begin, especially in areas where students live. The streets are a mess with all the moving vans and trash, and there's always a student somewhere who's not used to driving a rented truck, ignores a low clearance sign, and gets stuck under a bridge or tunnel.
  19. QUOTE (Elktro @ Jun 26 2008, 11:21 AM) Is there some reason you can't use a shift register instead of a feedback node, and a structure that looks like this: http://lavag.org/old_files/monthly_06_2008/post-3989-1214500441.gif' target="_blank">
  20. It's often difficult to take C code and translate directly to LabVIEW because the two languages just don't work the same way. Also, I think your C code does not match what you wrote that it should do. In your comments you state that function() should only execute once, but you have written the code such that function() executes every time through the loop, and only copies the result to abc once. In LabVIEW you don't need the variable "num" since it's already provided within a while loop, at the "increment" terminal (the little i in a box). You can connect that to a case statement; in case 0 you run function() and in the default case you pass the value straight through. It would help if you post your LabVIEW code (or at least a screenshot) so we can see what you've tried to do, and comment on it more specifically.
  21. QUOTE (Antoine @ Jun 24 2008, 08:46 AM) This is definitely not the way to do it - you're potentially losing precision while adding overhead and extra bytes of data. There are much easier ways to convert numeric data into a string for transmission purposes. Take Justin's suggestion - use flatten to string and unflatten to string. Or, if you don't need to do any verification of the data type on the receiving end, just use Type Cast, found in the Numeric pallette under Data Manipulation.
  22. QUOTE (Tim_S @ Jun 12 2008, 10:59 AM) A watchdog isn't quite what I want here. The ActiveX component handles printing specialized labels in a dispensing system. Whenever I finish one batch (or one size), I call a VI, containing the ActiveX component, to print the next batch of labels. If it crashes, I'd like the rest of the machine to keep doing what it's supposed to be doing, and seemlessly restart the print job. I suppose I could do it the other way - write a daemon that sits and waits for print requests as a separate application, and then if the main application fails to connect to the print daemon it could restart it.
  23. I'm using an ActiveX component that crashes every once in a while (maybe once a month). When it crashes, it takes down my entire application. If I use VI server calls to launch the VI that contains the component, instead of calling the VI directly, will my application continue running even if the ActiveX component crashes (and if so, do I need to use the Run VI method instead of call by reference)? Is there an easy way to detect that the VI has crashed and I need to restart it? Unfortunately due to the infrequency of crashes, and my inability to cause them consistently, I can't test this out easily.
  24. QUOTE (Siconi @ Jun 12 2008, 04:07 AM) I do not believe Advantech supplies any component that integrates directly into LabVIEW and provides icons in the palette. In order to use the ADAM DLL, you need to set up a Call Library Function node to call into the DLL. The ADAM documentation, header files (.h), or example code for other languages should provide all the necessary information, but it helps to have a basic understanding of C in order to set up the parameters properly. You only need to configure about 6 calls, most of which are straightforward. I suspect the ones you need are Open, Connect, Read Coil, Write Coil, Disconnect, and Close (at least, those are the ones I use for the 5000TCP series).
  25. QUOTE (menghuihantang @ Jun 11 2008, 12:36 PM) I'm not certain, but I think your problem is that you've left the "User Parameter" input of the Register for Event node unwired. You need to wire something to that input, and it should match the type of the data you expect to be returned in the event.
×
×
  • Create New...

Important Information

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