Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by todd

  1. Turns out I can do the enum-to-case-to-class constant in a subvi, then upcast it in order to put it in a cluster or array. The goal is to keep the various specific instrument classes all combined, somewhere. It may turn out to be more overhead than necessary, though.
  2. Ah, yes, thanks! That's a good one. They create four instruments from four children of class DSSP. If I put those constants in an array, and downcast them in a loop, the array of child classes appears as expected. What I'm hoping for is a way to placing the child constants in a sub VI instead of having them on the BD. Perhaps the sub VI would need to be reentrant so as to "create" each class instance. Thanks, again!
  3. I wish I'd seen Michael's vishots about classes and instruments a few months ago. I've made it to that level of functionality and am looking for the next baby step of having multiple instruments to iterate over - just for init, status and cleanup functions. (Most of the actual instruments stream data. I put that into a queue as it arrives, and process that queue into an LV2/AE - though it seems a look at classes +| IPE may be in order, as long as the performance is there.) I'm playing around with an instrument class that has child classes of dmm, gpio, power supply, serial binary streaming device, etc. Each of those classes has a child class for specific devices - for example, dmm might have child classes: agilent 34401, simulated and custom. I saw someone use a "create" or "new" method somewhere on the forums, here, but I can't find it now. Basically, I want a case statemtent to return a "simulated" or "34401" class, but in a subvi. See the attachment. I apologize for not taking the time to post code. The blue circles error out as expected, since real instruments are not installed. The red one does not. All that's in the "get new class.vi" is that case statement. (I added the "base" class instrument in an attempt to use dynamic dispatching and class-casting. Of course I've learned better than that by reading the forums. I remember seeing an example of this in someone's code on the forums, here, but I can't find it. Anyone remember the link - or have any other feedback? Thanks, --Todd
  4. I notice your tribot detects a dark line early. Mine (er, my son's) didn't detect at all. A quick change to monitor mode showed the right value to use. I am impressed at the ease-of-use of the new programming app. The original was obutse enough to make me delve into the ngc route. The new one lets me get the program written _before_ my son completes the build. As far as cats (outside, at least) a friend of mine set spring-loaded paint stirrers (30cm long sticks) at cat level around his garden walls. He added vaseline to the end so the stick would smack the cat and deposit the petroleum jelly. The surprise and the work required to lick off the jelly deterred the neighbour's cats from any further visits.
  5. Aitor, given Alex's next question, this may be jumping in a bit deep. It took a while for (even) me to get Matlab's build system understood. It wasn't well documented. Read the LabVIEW help for SysExec.vi (search for it) and the Matlab help for 'batch mode'. From the terminal (command line) you can type: matlab -r asdf.m to start Matlab and have it run asdf.m. If the last command is 'exit', Matlab closes. SysExec.vi lets you do this from LabVIEW. I sometimes use LabVIEW to generate data files that get used in the m-file - which then creates an output file.
  6. I hope you don't mind that I'm posting your PM, Alex. When you open a vi that contains a Matlab script node, an instance of Matlab is automatically started that LabVIEW controls over ActiveX. You are only limited by the datatypes allowed into and out of the script node (plots work, too). Once the vi is closed (removed from memory/heirarchy) the Matlab instance closes. I have found it most useful to run Matlab in batch mode using SysExec.vi. That way I can programatically create data files and m files. --Todd
  7. Here are some ideas: 1. Use MATLAB in batch mode. 2. Copy all your m-files into a single MATLAB Script Node. Add top level m-code to selectively run the subs. 3. Roll your own using ActiveX.
  8. If you click 'search' in the Block Diagram's "Functions" palette, then start typing a word, the results window shows an incremental search. You can double click an item in the results list to see where it lives.
  9. ASCII is ones and zeros, too. Perhaps the attached VI is helpful. Download File:post-107-1114756820.vi
  10. If the driver VIs have the same filename: 0 close LabVIEW 1 delete or rename the driver VIs you don't want linked 2 open the driver VIs you do want linked 3 open the VIs that call the driver VIs 4 save all
  11. Did you enable the ActiveX server in the Application Builder settings? Even if not, I haven't seen that crash a system (if by 'crash' you mean blue-screen). Also, does the .exe crash on the development machine or just the production machine?
  12. When you build the exe, check "Create Installer" then under "Advanced..." button, check "LabVIEW Run-Time Engine".
  13. todd


    How about search this forum for "Getting Started" Also, see the "Getting Started" subforum of "The LabVIEW FAQ" forum here.
  14. So, thinking out loud, one person talking (P1) and two other people listening (P2 & P3). P1 asks P2 a question and extracts the answer. P1 then asks P3 a question and extracts the answer. Does your I2C driver allow you to do reads and writes separately? If so, P2 and P3 can each hold their answers until P1 extracts them. In other words, have one subvi that accepts an address and does the read, another subvi that accepts an address and does the write.
  15. I'll send it tonight. The biggest file is a 30MB data.cab that may be splittable if my outgoing server won't work.
  16. I've got the 34MB zip file. Can you receive this? I'm looking for a place to upload it.
  17. A UART running at 115200 bits/second takes 8.68us per bit. A ten bit packet (start bit, data Byte, stop bit) therefore lasts 86.8us. Round to 100us - you have time to transmit four Bytes.
  18. todd

    FFT vs T

    Is this called a moving FFT? Perhaps the waterfall in this toolkit is along those lines.
  19. How about using one queue to get requests from all clients to the server. Then in each client obtain a queue whose name is the client's name. Send the client's name as part of the request cluster. Have the server parse the client's name, obtain that queue, and send the data. Edit: added image.
  20. Allow me to increase my post count by suggesting that you start with an XY Graph with Time values on X-axis and Frequency values on Y-axis.
  21. If I recall correctly, VISA _only_ includes access to USB devices from the Test and Measurement Class, sub-class USB488 (USBTMC-USB488). A USB to RS232 converter is not a USBTMC device.
  22. Data Changed is in the OpenG comparison pallette. You do use OpenG, don't you?
  23. Go to the Download section of the Instrument Driver Network on ni.com. Enter Tektronix as manufacturer; enter TDS 210 as additional keywords. I am happy to see that this driver uses LabVIEW VISA reads and writes instead of dll calls which were used for the last version of tktds1x2x I used. http://sine.ni.com/apps/we/niid_web_display.drv_search
  24. About once a month, while editing someone else's spaghetti, I wish there was a way to trace I/Os all the way through a BD. I.E. all "VISA Session" inputs and "dup VISA Session" outputs that are strung together on a single BD. Or all Picture Ins and Picture Outs. Wildcards would be helpful as well as the ability to invert wire selection for deletion. Sometimes it's enough to select the VIs from Hierarchy view and copy-paste them into a new VI. This clears all wires but loses dataflow/screen position.
  25. Right click on an array and select "Add Array Dimension". Alternate: bundle each array separately.
  • Create New...

Important Information

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