Jump to content

Jeff Plotzke

Members
  • Posts

    144
  • Joined

  • Last visited

Posts posted by Jeff Plotzke

  1. Daklu,

     

    Were you ever able to get to the bottom of this error?  I'm having the same issue.  I've simplified my code down to a very basic lvclass and still get an exception thrown anytime there's both an input and output of a class as you've shown.

     

    Using LV2013, VS2013, .NET 4.0.

     

    I've created the lvclass Vehicle, which has 3 methods:

    1. initializeVehicle -- Returns a LV class object.
    2. setMakeModel -- Inputs strings for make and model and stores in class private data.
    3. getVehicleFullName -- Concatenates the make and model strings from the object and outputs the concatenated string.

    lvproject.png

     

     

    I call this from a simple C# console application:

     

    VIE.LVClassTest.Vehicle testVehicle;VIE.LVClassTest.Vehicle.initializeVehicle(out testVehicle);VIE.LVClassTest.Vehicle.setMakeModel(testVehicle, "VW", "Golf", out testVehicle);            string vehicleName = "";VIE.LVClassTest.Vehicle.getVehicleFullName(testVehicle, out vehicleName, out testVehicle);Console.WriteLine(vehicleName);

     

    I get a VIAssemblyException at the setMakeModel function saying: "Failed to convert the LV Class to the .NET class because LV cannot get the LV Class Instance."  The function initializeVehicle works fine.

     

     

    As a test, I also tried calling the .NET assembly in LabVIEW:

     

    lv_vehicletest.png

     

    I also get the same exception thrown at the setMakeModel invoke node.  Probing the outputs for the functions, initializeVehicle returns a valid refnum, however setMakeModel returns a null refnum.

     

     

    Any thoughts?  Thanks!

     

    (Also cross-posted as a reply on NI forums here: http://forums.ni.com/t5/LabVIEW/Problems-exporting-a-LVOOP-class-to-a-NET-interop-assembly/m-p/2801694#M821666 )

  2. At the top of the Code Repository forum there is an information box the give the Code Repository guidelines.

    Hovering over these links I am told this are "External Links" and trying to following these links give me an error

    [#10344] You do not have permission to view this topic.

    Thanks for noticing this -- We're currently re-organizing the Code Repository guidelines for LAVA 2.0 and don't have them up yet. We'll have that posted this afternoon and then those links will work.

  3. Does anyone know the advantage of PXI system, is there any difference from PC system? or please give some hint for PXI programing.

    A PXI backplane is essentially a PCI bus with added signals for dedicated timing and synchronization. I'd use PXI if you're specifically looking for synchronization between cards. Other than that, and being different form factors, there's nothing else largely different between the two.

    PXI systems run either with an embedded controller (which typically run Windows, but could also run an Real-Time OS) or can be linked to a PC using an MXI cable. You'd program in LabVIEW the same you would on a desktop.

    Here's a page that describes PXI: http://zone.ni.com/d...a/tut/p/id/4811

    • Like 1
  4. When I visit a particular forum, I can click the "Mark as read" link that will flag every topic in that forum as read by me. That removes those topics from my View New Content page. What I would like is to have that same link on the View New Content page so that I can look at a list of topics, respond to the ones I'm interested in, and then mark the others as read so they stop showing up in my View New Content list.

    At the bottom of every page, there's a "Mark Board as Read" link that will wipe the "View New Content" content. Is this what you're looking for?

    post-4078-124698067825_thumb.jpg

  5. I have been using googles cached copy of the lava pages for the last month XD. (by the way could you perhaps get some of the missing pieces from them? if there are any.)

    Google's cache has been keeping up and started caching the LAVA 1.0 'Offline' page about a week after it went offline. But, we should have all of the missing pieces back up on LAVA 2.0 now -- Let us know if you see something missing.

    Thanks!

  6. QUOTE (Thang Nguyen @ Jun 2 2009, 05:23 PM)

    I would like to know if there is any way to access the controls on the GUI of application made by LabVIEW from other programming languages?

    If you're trying to do automated testing or control of your application, I've used AutoIt3 before (jlokanis also brought this software up in his post). AutoIt is a sort of scripting language where you can define mouse/keyboard events, looping, file manipulation, display interaction -- you name it. This software can do a lot.

    In my application, I needed to test running my application with about 50 different configuration files. I pre-made the configuration files and then had AutoIt automatically copy a new configuration into the application directory, run my application, wait for it to start, click the Run Test button, wait for a pass/fail indicator to turn red or green, then click the exit button, and then start again with a new configuration file. After about 10 hours (and several beers since I didn't have to sit next to the tester :P ), I came back and only had to look at log files generated from my application.

    That said, the button clicks were done solely based on a command in the script that said "do a single-click at coordinates 123, 345 on the display") -- I couldn't actually pass in the button name or the like. I had to do several test runs to smooth everything out.

    Perhaps this is up your alley. Best of all, AutoIt is open-source (read: free).

  7. Christopher Relf and I will also be co-presenting another topic at NI-Week: "Software Engineering with LabVIEW from Requirements to Deployment". Focused on V-Model development from requirements to traceability through the product development cycle, we'll be discussing how to incorporate National Instruments tools (Requirements Gateway, Unit Test Framework, etc) to ensure quality in your projects. I'm also planning on walking through regulated industry case studies and how this process easily maps into these regulations.

    Note that this is meant to be an advanced session and I don't want to turn this into a sales presentation. What would you value most in a process-oriented presentation? How many of you have used NI tools in order to more closely tether your requirements and design to your development? Do you currently struggle to maintain a V-model development process?

    Thanks for any of your feedback!

  8. QUOTE(crelf @ Jul 11 2007, 11:12 AM)

    I don't agree - Excel handles a range of delimters including TAB and COMMA, and I don't think that either of them is better than the other - it really depends on what you're trying to do.

    I would say using a tab is much better, especially for numerical data. Throughout Europe (and other countries) where a comma is the decimal separator, a comma delimeted spreadsheet could turn into a nightmare!

    I typically only use tabs for delimited files.

  9. QUOTE(Kalitexnis @ Jul 6 2007, 06:46 PM)

    I am using fedora 7 and labview 7 and when i type the tune2fs command on the console it says command not found.The strange thing is that i found the manual for that command. Can you think any reason why is this happening.

    Many thanks in advance.

    tune2fs should be located in the /sbin folder -- Which you may not have located in your PATH variable. Try executing "/sbin/tune2fs" instead. (and as osvaldo mentioned, you'll need to be root)

  10. QUOTE(DDAdevil @ Jun 20 2007, 11:48 AM)

    Hi,

    I have a program I need to run on one computer that uses the DAQ Ni software to read data and is wired into a laboratory. I want to be able to view the same front panel display screen and access this from different computers that are networked. I believe it is more complicated than merely having an .exe file on labview capable computers that are networked as only one program can be reading the data from the inputs at a time. Any help on this process would be appreciated.

    Thanks

    What about LabVIEW Remote Front Panels?

  11. QUOTE(rolfk @ Jun 10 2007, 06:07 PM)

    I assumed that "SOFTWARE" meant LabVIEW (and other included NI software)... not executables created with LabVIEW, but I'll have to read the license to find out for sure...

    QUOTE(rolfk @ Jun 10 2007, 06:07 PM)

    Your test shows most probably nothing. The only code your dissassembler can see is the startup stub that loads the LabVIEW runtime system and then passes the reference to the internal LLB to that. The machine code located in the VIs inside that LLB, can only be located and invoked by LabVIEW. There is no disassembler that could possibly know how to find the LLB, not to speak about the VIs inside it nor the LabVIEW generated machine code in each VI.

    Basically every LabVIEW executable of a given LabVIEW version will give you exactly the same assembly code.

    You're absolutely right -- I just created a considerably different VI from what I tested with originally... and *cough* *cough* *cough* -- The exact same disassembled code was created.

    That's interesting... So, does this mean that a built EXE actually contains some intermediate language (in the LLB) that's interpreted by the runtime engine or does LV actually generate the machine code while it builds?

  12. QUOTE(dbyers3 @ Jun 8 2007, 10:23 AM)

    Thanks Guys,

    All worked great. One last thing,,, How about getting the Computer name????

    Perhaps there's an easier way... but running 'ping localhost' gives the local computer name:

    "Pinging <computername> [127.0.0.1] with 32 bytes of data:"

  13. QUOTE(crelf @ Jun 7 2007, 04:30 PM)

    I just heard an interesting tidbit at a local LabVIEW User Group meeting: one of the attendees said that he'd heard an NI presenter at a recent NI Developer Days session comment that changing the status of a connector pane terminal from "Optional" or "Recommended" to "Required" made it more efficient (I'm not sure if that meant memory or speed or both). Anyone heard of this one?

    This looks like it's false and it doesn't make any difference...

    I just created a quick VI that contains a subVI. I originally set the connector on the subVI as optional... then built the application as an EXE. I then used a Win32 dissasmbler to convert the EXE into an ASM file. Then, I took the subVI, marked the connector as required, built, and disassembled again. I did a compare between the two disassembled files. No difference. The files were identical.

    I did this several times and tried also with dropping down the subVI several times on the BD of the top level VI. Still in all instances, changing the connector pane between optional or required made no difference in the EXE produced.

  14. QUOTE(crelf @ Jun 6 2007, 12:10 PM)

    As an aside, the only money in authorship is in fiction - non-fiction will rarely cover your costs, especially if you consider the time you put into it.

    That would in interesting... a LabVIEW fiction book...

    "It was a dark and stormy night. Sounds of PXI fans whirled in the darkness. Jeff could feel someone watching him as he watched his comma delimited text file convert into binary..."

    Hmmm... on second thought... maybe not. :P

  15. QUOTE(chiupohsiang @ Jun 5 2007, 11:14 PM)

    Now, I want to press "start" button, and then type "start" string, it can start receiving 0~255 A/D data from single chip. When I type "end" string in my "input string" box, it can transmit "end" to my single chip, and then single chip will stop. Why my LabVIEW can not do it? Can you help me? Thank you.

    P.S.:My single chip program has already passed testing by Windows Hyper Terminal. When I type "start" string single chip can transmit 0~255 to Hyper terminal, when I type "end" string single chip will stop transmit 0~255 A/D data. Now, I just want to design a interface which it function like a Hyper Terminal.

    A few things I see:

    -You close your VISA reference after you write to the serial port, but before you read. You should leave the port open until you want to stop reading/writing.

    -This program constantly writes whatever string is in 'input string' every iteration of the loop... So, right now, it does:

    Configure Serial Port

    Write String to Port

    Read 8 bytes from Port

    Configure Serial Port

    Write String to Port

    Read 8 bytes from Port

    Configure Serial Port

    ...

    Is this really what you want? I take your description to be:

    Configure Serial Port

    Write String to Port

    Read 8 bytes from Port

    Read 8 bytes from Port

    ...

    Read 8 bytes from Port

    Write 'End' String to Port

    Close Serial Port

    You'll need to look at the order of what you're executing. I'm guessing you'll want to put the serial read into a while loop to read the A/D data. Remember, you can also use the 'highlight execution' option to follow what your code is doing.

×
×
  • Create New...

Important Information

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