Jump to content

ShaunR

Members
  • Posts

    4,998
  • Joined

  • Days Won

    311

Posts posted by ShaunR

  1. Hello,

    I have to connect two computers for data transfer. However since none of these computers will have normal internet acces, the only way this can be done is through satelite communication.

    I have two satelite phones available which can be connected through a COM port to the computers. I have been able to transfer the data with VISA, when the connection between the two satelite phones is running. However since I have to pay for this communication per minute, and data only needs to be send once every 10 minutes or so I have been looking for a way to make LabVIEW initialise the connection between the two phones when data becomes available, and terminate it again when the transfer is done. I can't seem to find any way how to do this though.

    I hope anyone can help me with this.

    Thanks

    I'm presuming that when you say it's connected through the COM port. The phones have a built in modem (most modern ones do). In which case it is just choosing the appropriate AT commands. (e.g ATD+12125551212; to dial and ATH to hang-up)

  2. Sounds similar to an issue I had once. The provider changed the server I was hosted on and required me to update my NS records to the new server. I added all the new ones but I missed deleting one of the old ones (although I could swear blind I got them all). The result was intermittent DNS lookups because there was a 1 in 3 chance the lookup was done through the old one..

  3. The regular expression primitive is actually an xnode (the tell-tale busy cursor whilst it generates the code).

    Once the code is generated by the xnode your string is passed to the regex function in the labview.exe (MatchRegExpEfficient). But. When it' returns, it is parsed in Gcode using several split string functions to split out to the terminals. So not only do you have a regex engine overhead (which may or may not be the same as match pattern - i don't think it is). But you also have 4 or 5 (more if you grow the terminals) additional split strings.. So at best, the regex function would be 4 or 5 times slower, even without the call to labview.

    But match pattern (as blazingly fast as it is) becomes unwieldy and difficult to use on selective string matching (where something may or may not be present - like area codes in a telephone number). That's when you need the regex.

    NB:

    Your image shows 75k for the match pattern and 210k for Tons.

    • Like 1
  4. Thanks, I did searching before posting but couldn't find that thread for some reason. I tested it on Windows 7 32 and 64 and it worked as expected.

    I remembered the discussion, but had google it to find it again laugh.gif

  5. It seems to me that detecting the "Bitness" of the OS has to be OS dependant.

    So you would have to write individual code for each OS (eg. using a CDS).

    As long as NI does not provide such a property, your VI looks like a very usefull way to get this information (assuming we are on Windows, which is true in 100% of *my* use cases ).

    BTW: You are talking about "Application.TargetOS". I think "OS.DetailedName" is much closer to what you are looking for (but still not close enough, since it does not talk about Bitness).

    rolf posted a VI on this thread Determine 32 or 64 bit OS

    It's the same method used in other languages and uses win api calls.

  6. Must admit I I havn't had a lot of experience with DETT (labview tends to have very pungent code smells and my DETT tends to crash quite often yes.gif). But.....

    If you put them in conditional statements you can turn them on and off from a conditional define in the project. You can then build with or without just by changing a value and the compiler will take care of the rest.

  7. That is fine, but it fails to meet the design goals.

    Indeed. One design goal was "I want each loop to have its own child class". So it could never acheive that.

    You are using named queues. So, when you send a message, you must know the destination of the message and choose the right queue.

    As you must do with the class. The software doesn't know the developers' intentions, and must have a method for the developer to instruct it to send to the correct destination. The class does this by the developer laying down the appropriate class constant. The queue, by the developer laying down the appropriate string constant.

    Also, to add more messages, you must modify the execute function to add more cases. And, if you misspell the message command text, it will not work.

    That is a nature vs nurture type of argument. I would be saying single maintenance point, reduced VIs to debug, less VIs to implement., more code re-use. You would (probably) be saying more re-validation, more chance of breaking existing functions and more code re-use in 10 years time etc, . Granted spelling is a weakness (tell that to the JKI state-machine...lol) but the the upside is you can do other cool stuff like construct messages on the fly, automatic re-routing and scripting with minimal changes to the posted example.

    .

    So, it might be smaller, but it really is not the same architecture and does not have the advantages that LVOOP gives you.

    I'm not sure of what advantages you are talking about here (I don't see (m)any up-sides with LV OOP implementation for this - not the architectural implementation, the LabVIEW implementation mechanics).

    But I'm not here to derail your thread. Just add a bit for us non-POOP heathens. So we can probably leave it at you're designing a LVOOP messaging scheme and I've shown a functionally equivalent classical alternative for what you have so far.

  8. Cool. I have done stuff where the Main App sends Status Messages to the Splash Screen. Can you go into detail about how the hierarchy works here?

    Does the Splash Screen load the modules, then open the Main App so th modules stay in memory, then the Splash Screen goes out of memory etc... ??

    Cheers

    -JG

    Pretty simple really.

    The two main points are that the main VI's FP is hidden and it sends a message to the splash to tell it it's loaded.. You can either allow it to load in the background, or load it sequentially (I prefer the latter in case hardware checks fail).

    The splash screen itself just loads a config file (usually a section in the main app coinfig), iterates through the file list, dynamically loading (but not closing the ref) on each iteration. You can wait til finished or not depending if you want it sequential or background loading. When it gets to the last one in the list it shows it's panel if the "ready message was received (queues work best for that) As each module is loaded, it remains in memory so you get incremental loading of sub-vis and when the splash closes, any that are only used by the start-up modules will be disposed of and any that are used by the main app will remain (that's why I don't like namespacing and generally prefer llbs or directories over lvlibs).

    The key really is dynamic loading which means the splash is very quick to show regardless of the number or size of modules it needs to start up. Comms from the modules can be anything you like, queues, events even pass a string ref via thier front panels when you launch them. I tend to use named queues though (see my Non OOP version of the .Message queue and replace the A,B with the vi name or Dispatcher for my most used architecture which revolves around 1 VI).

  9. Pretty basic I know, but it works.

    I have other apps where the Splash Screen can create a log of the session, checks for driver version (DAQmx, dotNET) etc...

    I would like to add more features into the reusable code that I have in these other applications when I have the time.

    Good idea about using a VI tree!

    I do something pretty similar (without the vi tree). Only I also have a "config" file that tells the loader what to load (I usually have modules that need to check 3rd party hardware as well as DAQ etc, and feed that back to the splash so you see "Loading....[module name]") - they change from project to project)

  10. You are correct, i am trying to generate pulses to rotate my stepper motor as a first step, my final task is a bit more complicated (sadly) . I will give the "Cont Write Dig Port-Int Clk.vi" a try and I will be back with feedback, thanks a lot.

    My final target is to:

    a) send a pulse to rotate my stepper motor

    b)after the rotation is complete i want to send another pulse to an MCA device ( multichannel analyzer) to "tell" it to start counting -the voltage coming out of a PMT tube-

    c)after the counting is done, the MCA will send another TTL pulse to inform my program that it has finished and

    d)it will also send a varying signal in the order of ~mV which i want to collect and graph in my front panel at LabVIEW.

    e) This procedure will repeat in the speed and step of my choice.

    The controlling of the MCA device is easily done by an other program called Maestro so adjusting the time that the MCA will count and sending of the TTL signal to LabVIEW is rather easy.

    I want to ask whether this is possible by modding the "Cont Write Dig Port-Int Clk.vi" or i will have to use a handshaking vi (?).

    AGAIN sorry for the super lengthy post but i believe the better you ask the question, the more likely is to get the answer you seek.

    Thank you

    It's always good to give a background on what you are trying to achieve. I means you will get a more focused answer.

    So. You just need single pulses (an event generator) rather than a pulse train.

    There are quite a few ways you can do this in labview. But I've modified the example to just give one pulse as you are familiar with the vi. It's fairly straight forward. Set the OP high. Wait a bit. Then set it low.

    For ryou incoming pulse. Take a look at DAQ events. (There is an example). You can then wire the digital out to the digital in and check to see that you can create and detect the pulses.

  11. I don't think the example is wrong either, I m probably using it the wrong way, here it is:

    That example is to demonstrate manually toggling single lines. I think you are trying to generate pulses. Yes?

    Look at the "Cont Write Dig Port-Int Clk.vi" in the examples. Change the "Pattern" to 0 and 128 and then run the vi.

  12. <br /><br /><br />

    I was just about to say that!

    Seriously though, I'm seeing a 2-3x speed improvement on my laptop (IE8) and about a 5x speed improvement on my smartphone (Opera 9). Anyone else getting a different experience when compared to the previous host?

    Surprising! Set up the "mod_expires" then it'll be really humming along.

    LAVAG NEW

    LAVAG OLD

×
×
  • Create New...

Important Information

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