Jump to content

John Lokanis

Members
  • Posts

    797
  • Joined

  • Last visited

  • Days Won

    14

Posts posted by John Lokanis

  1. Before I go and reinvent another wheel, does anyone have a VI that will reverse a string but not esc'd chars in the string?

    For example, if my string is:

    find \[this\] text

    and I want to find it by searching from the end of my data first, I reverse it and the data before using match pattern. But the reverse is this:

    txet ]/siht[\ dnif

    what I need is this:

    txet \]siht\[ dnif

    because I need to preserve the esc'd special chars in the search string so match pattern works.

    thanks for any help!

    -John

  2. I'm trying to get NI to hold the LabVIEW Object-Oriented Programming System Design class in the Seattle area thiswinter. So far, we have narrowed it down to the first half of December. But, we need a few more students to make it happen. If you are interested in taking this class, please let me know and call your Field Rep so they can coordinate things.

    Here is some info on the class:

    http://sine.ni.com/n...g/en/nid/205080

  3. Those of us that create product have zero use for scripting.

    I have to disagree with this. I only create product and have used scripting to do things I could not otherwise do. For example, in LV2010, you can now run a VI before and after you do a build (of anything). Well, since NI decided to not include a version number in a built LabVIEW Web Service, I added a function to my web service that returns my own version number. And, I created a VI that will (using scripting) increment the value that function returns. I then call this VI everytime I build the web service. Thus, I have used scripting to create an auto incrementing version number in something that had no version information at all before. This is very important in LV2010, since you can create a project that does not build any EXE but instead builds a web service and an installer to deploy it on a target.

    I am sure that over time we will find even more ways to add a little scripting into our code to help us build better deployable product. Just need to think a little outside the box (or sequence structure, in LV terms wink.gif).

    -John

  4. I whipped out this tool yesterday to extract the call spec for any web services you have created in your project. This will make documenting your web calls much easier. I have tested this with all my projects that have web services in them but I would like others to give this a try and let me know if you find any bugs. I will be including this tool in my upcoming LV2010 web service tool package.

    The VIs are written in LV2010.

    -John

    Get Web Service Call Spec.zip

    • Like 1
  5. Ok, the issue with calling from c# was due to how the c# app was built. In order to make this work you need to set the platform properly in Visual Studio. Here is the explanation from NI:

    If you set the platform target as any cpu, your app willto treated as x64 on 64-bit windows. In this case, if you do not have 64-bit LVRTE installed, it will throw an error. However, if you do have the 64-bit run-time, but try to run the 32-bitLabVIEW built assembly, it will throw an error as well. So, you need to select x86 as the platform inyour Visual Studio project, which will allow you to run the assembly with the32-bit LV run-time engine.

    The support engineer promised to put this in a FAQ on building .NET assemblies in the near future.

  6. I understand that it is annoying, and I will try my best to make sure it gets fixed. Why do you need to change the names back again? In the meantime, is it not possible to just pick names that will allow it to be sorted the way you want it all the time?

    I suppose but I don't really like naming my build specs:

    a myapp web service

    b myapp exe

    c myapp installer

    Also, CAR #247090 has been created to track this issue. I hope it is not too late to get it fixed in SP1.

    • Like 1
  7. Also, I cannot call a .NET assembly build in LV2010 from C# either. It appears that the wrapper they add to the assembly is failing to detect the existence of the run time engine. Even on my dev machine. So, if you use .NET assemblies generated by LabVIEW, do not upgrade to LV2010 until there is a fix for this.

    Looks like the issue is limited to 64 bit OSes. We got it to work on WinXP (32 bit) but it fails to work on Win7 (64 bit). I'll post a CAR if one is issued.

  8. I don't think so. I was told that the VIs do not persist from one call to another. And are all basically reentrant so they cannot cross communicate.

    Some new news:

    LV2010 cannot call a .NET assembly created in LV2010. This is a known CAR. Might also apply to LV2009. Not sure about LV8.6 or earlier.

    Also, I cannot call a .NET assembly build in LV2010 from C# either. It appears that the wrapper they add to the assembly is failing to detect the existence of the run time engine. Even on my dev machine. So, if you use .NET assemblies generated by LabVIEW, do not upgrade to LV2010 until there is a fix for this.

    Oh, and see my bug about the build spec order here before that one bites you as well...

  9. I found a new bug in LV2010. Back in LV8.6 I reported an issue where the order of the build specifications dictated the order they would be built when doing a build all. So, If you created an EXE first, then an installer, then later added a web service and included it in the installer, the order of the build would be:

    Exe > installer > web service. Thus, when you make edits to the web service code and do a build all, your changes will not be picked up unless you build all twice, since the web service would be build AFTER the installer.

    The work-around was to drag the build specs around to rearrange them so the web service came before the installer that needed it. I reported this and said that a better fix would be for the project to detect this dependency and build the components in the right order.

    Well, in LV2010, not only has this not been fixed, but you can no longer drag the build specs to rearrange them and work around the bug. frusty.gif

    So, better plan your project completely before trying to build any part of it...

    • Like 1
  10. Ok, so there is no documentation after all. At least non that NI has produced yet. But I did figure out some things.

    1. The VI name and connector pane controls and indicators are used to construct the method call.

    2. You can only create methods.

    3. The .NET VIs run in their own application instance that has no persistence between calls.

    4. Apparently, LabVIEW cannot call it's own generated .NET assemblies. This sure is annoying when testing them.

    I will add more info here as I figure it out so the new person does not have to...

  11. I have decided to create a .NET assembly to expose an automation interface to my EXE. I dug around in the manuals and on NI.com for some info on how to do this but only managed to find instructions on how to build the assembly. I could not find anything about designing one. So, I was hoping someone on LAVA could point me in the right direction.

    I am thinking is it a lot like web services. Perhaps if you have done this you can confirm or deny my assumptions:

    1. The assembly operates in it's own application instance. Meaning the only way to talk to the EXE from the assembly VIs is VI server.

    2. The connector pane of the exported VIs is used to set the input and output parameters of the exposed .NET method

    3. The VI name is used to name the method.

    Some questions: Can I only create methods or can I also create properties? If so, how?

    I'm sure I will think of a few more questions as I dig into this more.

    thanks for any help.

    -John

  12. Now that LV2010 allows you to separate your VI source from the compiled obj code, some issues come up for distributing plug-in VIs.

    Currently, I use the OpenG Builder to package my plug-in VIs. (I include the entire hierarchy, namespace them so there are no conflicts and strip off diagrams) I can then call these dynamically from my EXE. But, if I choose to separate the source from the complied code, this will no longer work because the RTE cannot call a VI that has been separated.

    So, the solution is the OpenG Builder needs an option to recombine the source and object code when it build the output LLB file.

    Separating the source and object code makes a lot of sense for those of us who keep all our VIs in source control. I would prefer to apply this to all my VIs but I cannot as long as I need to build plug-in packages that are not 'compiled' in the normal sense.

    If you know where I should post this so it get the attention of those in charge of the OpenG builder, let me know.

    -John

  13. Having not used graphs or charts in a very long time, I waswondering if someone could give me some tips on how to solve what is probably avery easy problem.

    I need a waveform chart (not graph, because I only want todisplay a certain number of recent points and will be continuously accumulatingdata) of temperature readings. Where itgets complex is I need to timestamp each reading. Also, the time between datapoints is notfixed. There is no ‘sample rate’ so t0and dt will not work for me.

    I need to feed this chart a starting time (timestamp) when Iinitialize the display and then at any random times later, feed it a y value andtimestamp. I expect it to plot the yvalue at the appropriate point on the chart and draw a line from the previousvalue to it. Also, if the y value is anarray, then each datepoint in the array is for a different plot, all with thesame timestamps. As the history is filled, I expect the oldest data to disappear off the left side of the chart.

    I also would like to set the history length wheninitializing.

    This sounds like a job for an X control to me, but I am notsure where to start. Anyone know of agood example to look at or have something to share?

    Thanks,

    -John

  14. I just posted an updated version for LV2009. Had to tweak some of the fixed paths in the installer batch files to deal with the different folder names. Also, took out the work around for the missing log folder. This was an issue in 8.6.1 but it was fixed in 2009.

    Known issues: In 2009, the service takes 2 minutes to become responsive once started. This is because I am running it as a SYSTEM service and not under a normal user. If you just start the exe as a user, it starts working immediately. No word yet from NI on why this worked find in 8.6.1.

    Also, the Distributed System Manager works even less well in LV2009 so I do not recommend using this tool with web services.

    I will post a LV2010 version sometime after NI Week. I think LV2010 will make some significant improvements to web services.

    -John

  15. I am also interested in how to use a LabVIEW Web Service for a larger scale app i.e. experiences/issues with hosting on a standard ISP server (if that is possible) etc... - Is this within the scope of the presentation?

    The web services are hosted on the target machine where your app is running. We do host pages on a standard Apache web server that access the web services to get their data. I am not an expert on the html side of that but it is fairly simple to do, from what my web guy tells me.

    I am in the process of getting my web services to run on Win7 and Win2008server. The biggest headaches are due to the added security and changed file paths. I think this will be much easier under LabVIEW 2010, however. Looking forward to the new changes. I will try to address them in my presentation.

    Back to the main point of this thread, if this is your first time to NI Week, be sure to pack a fleece and long pants. While it will be +100degF outside, it will be ridiculously cold in the convention center. If you are wearing shorts and a t-shirt, you will freeze your arse off...blink.gif

    • Like 2
  16. Practical Applications of Web Services in LabVIEW - Thu 2:15 PM (Also very curious...man the 2:15 slot on Thursday is tight)

    Actually, this session is on Wednesday. I will be talking about deploying web services to a target machine that only has the RTE, how to implement a web based API for your applications and demoing some nice tools I have created for managing your LabVIEW apps remotely. Hope you can attend! Gotta go practice my presentation now. It is due to be turned in for final approval tomorrow!

  17. I'll be arriving Monday afternoon. Staying at the Hilton. Should be able to make the block party Monday evening.

    Don't miss my session on web services Wednesday afternoon!

    TS2796-SW Practical Applications of Web Services in LabVIEW

    I'll be at the LAVA BBQ Tuesday and the NI Party on Wednesday. beer_mug.gifbeer_mug.gifbeer_mug.gif

    Probably end up milling around the JKI booth the rest of the time, trying to absorb as much knowledge as I can...

×
×
  • Create New...

Important Information

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