Jump to content

bbean

Members
  • Posts

    264
  • Joined

  • Last visited

  • Days Won

    10

Posts posted by bbean

  1. 20 minutes ago, ShaunR said:

    The NI-9219 has a programmable constant current source and +-25mA is the range, isn't it?. The examples show a default excitation current of 50 or 100uA. I don't know what the resolution is off hand so don't know if it can go down to 10uA, though.

    I confess I haven't dug too deep into this but based on the support note here, I'm not to optimistic: Thermistor Measurements Using the NI-9219

    • there is a 10K upper limit for resistance measurement (we have 10k thermistors...so the resistance will exceed this at lower temperatures)
    • The NI-9219 has an unregulated voltage source that excites anywhere from 220µA to 420µA across the thermistor depending on its resistance

    10k thermistor measurements seem like a pretty common item, not sure why NI doesn't have an off the shelf module/approach for this with cRIO/cDAQ

    Support note Snip-->

    " In cRIO and cDAQ, measuring thermistors can be accomplished by setting the NI-9219 to 2-wire 10 kΩ resistance mode. This will return a resistance measurement that can be scaled to temperature using the thermistor's scaling coefficients. DAQmx doesn't support thermistor measurements on all channels. On NI-9219 DAQmx supports channels _cjtemp0:3, but not channels ai0:3. If using this configuration, keep in mind the following limitations: 

    • The 2-wire resistance measurement configuration is easier to assemble than the half-bridge configuration, but it does not take into account measurement accuracy.
    • The NI-9219 has a 10 kΩ limit for making 2-wire resistance measurements, which is too narrow for many thermistors. This is the first limitation. 
    • The NI-9219 has an unregulated voltage source that excites anywhere from 220µA to 420µA across the thermistor depending on its resistance (the excitation values for resistance mode can be found in NI-9219 Operating Instructions and Specifications). This could potentially affect the accuracy of some thermistors, because the current may cause self-heating errors. Refer to the thermistor datasheet to determine if self-heating will be an issue. 

    "

     

  2.  

    7 minutes ago, infinitenothing said:

    Why do you say the current would be too high with a 9219? The user manual say it would apply 2.2V which would be 400uA.

    The thermistors we are using are very small and based on the experience of others on the project, current > 100uA causes self heating of the thermistor and sensor error.  Ideally we run @ 10 uA source current

  3. Has anyone used cRIO to measure a bunch of thermistors?  We have to add thermistor measurements to an existing cRIO chassis and I'm surprised to find out NI doesn't offer an out of the box solution for this.  From what I've seen they say you can use the NI-9219 for thermistors up to 10k but the current would be way to high and would cause self heating. 

     

  4. 10 minutes ago, ensegre said:

    I'm evaluating the library for a project of mine, starting from minimal applications. I'm testing on LV17, one windows and two linux machines. My beginnings are fine on windows and on one of the two linuxes, while on the second one they boil down to errors like:

    which I get from Test Client.vi from the couple in <LV>/examples/drjdpowell/Messenging/TCP example/. On linux I'm with v1.8.3.82, limited by vipm2014. I suspect a simple network configuration difference, but I'm still too lost in the bowels of the library to attempt debugging. Any hint?

    Sounds like a firewall issue.  One side may be blocking the connection attempt.  Not sure about linux, but a recent windows update made the firewalls a little more strict and caused similar problems for me.

  5. Ok if you said PXI I was going to say check the RAM type.  I had a evil crash that appeared randomly on machines and after a long process with NI's help found that it was the RAM.  NI sells "certified" RAM for the their PXI's and I will always buy that in the future even though its a complete ripoff.

    Back to your issue.  Have you tried the Desktop Execution Trace Toolkit to check for reference/memory leaks yet?

    I wouldn't be scared about going under the hood of the db toolkit, but I wouldn't go there quite yet.

  6. 9 hours ago, drjdpowell said:

    The honest answer is that the work projects I have don’t use network communication, and so I haven’t had the time to add features.   Although I do want to keep things simple.   I think people are too quick to try and build complexity into the “middle layers” of communication (and too quick to work against TCP, rather than with it).  Ultimately, the Application layer needs to be able to address unreliable communication, as only it knows what a communication interruption requires.   

    My plans for further development of the TCP Messengers involves adding the ability to register with RemoteTCPMessenger for TCP-related notifications, in particular a “Disconnected” event.  The server side would have notification like “Number of Clients Connected”.   I could build a “ping” system into that, with notifications if the ping time increased beyond some threshold.  Then the Application can be informed of any problems, and choose to act on this.   

    However, if you really need reliability, you need to implement it at the Application level.   Just because a message has been successfully delivered does not mean it has been handled correctly.  Only a Reply message saying “Job done, results saved to database” tells you your message was handled.

    Ok makes sense..

    I had some more time to test today.  I tested the following and they seemed to work:

    TestClient with Async connection.vi (LV2014)--->LAN--->TestServer.vi (LV2014)

    TestClient with Async connection.vi (LV2014)--->LAN--->TestServer.vi (LV2016)

    TestClient with Async connection.vi (LV2016)--->LAN--->TestServer.vi (LV2014)

     

    One potential "bug" in the package.  When I click "Show Example" button in VIPM.  It opens the following path:

    ...\examples\drjdpowell\Messenging\TCP Example

    instead of what I imagine the intent is to open:

    \examples\drjdpowell\Messenging

    Also when I search for Messenger examples from the LabVIEW help window, the Messenger keyword doesn't appear anymore and I can't locate the examples from LabVIEW help.

    Thanks for all your help!

  7. Try this version.  See the TCP Example "Test Client with Async connection.   It will poll waiting for TestServer to start.  Also uses a Watchdog to identify when the Server shuts down.  I found and fixed another issue (Issue #6 on bitbucket), so I'd like you to test it before I put this in the CR.

    drjdpowell_lib_messenging-1.9.1.88.vip

    I tried a quick test of the new build only traversing the local host from client to server and it worked well.  I will try a more extensive test across a local network tomorrow.   I need to update VIPM to 2017 on all the machines to get the package installed.

     The ping feature of the example is nice because previously when I set up a test with only server-->client messages, if you pulled the network cable the TCP actor on the client side wouldn't timeout or error so you didn't know something was wrong.  Quick question, is there a reason you decided not to implement the ping and "keep alive" features as an option in the TCP actor itself.  Were you worried it would interfere with overall throughput from the TCP Actor's callers? 

  8. The problem you’re having is because the TCP Client actor is launched as an “Autoshutdown slave”, meaning it will shut itself down when it’s caller dies.   See below.   As the caller is your short-lived Async Action, it shuts down immediately.

    You just need an async Request-Reply instead of the sync Query currently used in RemoteTCPMessenger:Create.vi (see below).  Replace the Query with a Send, and supply your own Reply Address.   The TCP Client Actor will send you a reply (containing the string “connected” if it was successful, or an Error Message if it isn't).   You can then decide to restart it if it failed to connect, or start sending messages if it did connect.

    Let me know if this works, and I’ll make a Messenger-Library addition of an async way to start the RemoteTCPMessenger (I would do it in a slightly more complex way, where the RemoteTCPMessenger is returned in the Reply message, so there is no way to send it messages before it’s connected).

     

    Replacing the query with a send and wiring in the reply address worked.  I just temporarily created an asynch create VI (without dynamic dispatch to test). 

    If you are updating the RemoteTCP Messenger class, can you expose (make a datamember of the class) the timeout value the Actor uses during communication to the Remote Service.vi?  It would be nice to be able to adjust this timeout if necessary.

    Thanks for your help

  9. On 9/5/2017 at 0:14 PM, drjdpowell said:

    Added a new version 1.8.4.85 to the Code Repository.   Tested that this works between 2011 and 2017 using the TCP Client/Server example that comes with the library (with either side being the Server or Client).   The TCP Connection and TCP Client actors now send an initial message to each other containing a flattened variant, and they each determine if the other is running an older LabVIEW version (if so, they use bean’s fix from above). 

    Note that this only affects the VariantMessage class.   If you flatten Objects containing Variants then this won’t work, and I don’t know what happens if your VariantMessage contains a cluster that contains nested Variants.  Please report any such problems, and we can look into a solution.  Personally, I don’t tend to use Variants internally to other data structures, but I know others do.

    Also note that both sides of the connection will need to be running this latest Messenger-Library version, otherwise the initial exchange of version messages will fail.

    Thanks for the mod

    Sorry for peppering you with questions, but I have another one. I'm trying to connect to a remote server that may or may not be there.  I want to have the capability to attempt and retry the connection in a non blocking fashion (since it may not be there at all). Since the default timeout is 5 seconds and timeout is not exposed in the Remote Service.vi a synchronous approach can hang for a long time.  I tried creating an asynchronous remote connect lvclass in the attached example (mods your TCP client server example) that inherits from the Action.lvclass in your library.  I am able to launch the remote service ok and establish a connection in the TCP Client Actor, but when the Async Execute.vi finishes, I think the messenger queue that was created during execute "goes bad" or is destroyed when the Async Execute.vi goes out of memory.  

    Did I miss something simple or is there a better approach?

    Thanks for all your help, 

    Brian

    TCP Control Client Asynch Launch (Messenging).zip

  10. 1 hour ago, drjdpowell said:

    I'm thinking of modifying the TCP Messengers to optionally accept a LabVIEW version for use in flattening.   Then you can set whatever version you need.

    That sounds good.

    Is there a downside to simply flattening to the lowest LabVIEW version Messenger Library supports?  Based on my limited testing it seems like the unflattening in higher versions of lower versions works without code changes on the unflattening side.   It might be less effort for you this way.

  11. I modified the following VI in the library as a test and it seemed to "work" with messages between 2016 and 2014:

    C:\Program Files (x86)\National Instruments\LabVIEW 2016\vi.lib\drjdpowell\Messenging\Core Messages\VarMessage\Flatten Data.vi

    SendMSG.lvlib_VariantMSG.lvclass_Flatten_Data.vi_Block_Diagram_on_Seed_laser_con.png

    I am not sure if any information is lost flattening 2016 variant data to 2012 data.  Need to research further, but thought I'd throw the VI up for discussion

    Flatten Data.vi

  12. 15 hours ago, drjdpowell said:

    Hi guys,

    I'm on holiday this week, sans LabVIEW, so I can't help.   But question: is there a way to flatten to an older version of LabVIEW?   So tell 2016 to flatten to 2014 format?   I vaguely recall reading this.   If so, we should be able to make usingly an older format an options, allowing communication with an older version of LabVIEW.

    Yes there is a way as to tell 2016 to flatten to 2014 (and lower) described in Thorics link above.  Enjoy your holiday we can look at when you get back.

  13. 3 hours ago, Thoric said:

    Unbelievably, I'm encountering this exact same complication today.

    As far as I can tell, the reason is that variants are flattened to strings differently in every version of LabVIEW. Althoug the schema is the same, the actual version of LabVIEW is prepended in the flattened string. Thus, when a 2016 flattened string is passed to LabVIEW 2014 it does not assume to know the schema and throws error 122.

    NI's white paper on using "Variant Flatten Exp", which allows you to set the flattening format structure, is their recommended approach. Thus you can set your 2016 code to create 2014-style strings.

    Note: I think this only affects the flattening of variants. All other datatypes are unaffected.

    However. I am still noticing differences between my 2014 strings and 2017 strings. For me, the issue is now down to the links to the typedefs controls in the clusters that I use. when flattening clusters (that contain variants) to strings, that are linked to typedefs, there is still a problem when passing between LabVIEW versions...

    Hi Thoric,

    Are you having the variant problem using Messenger specifically or just the same generic problem with flattening variants between versions of LabVIEW?

    I took a little peak under the hood of the Messenger Library flatten / unflatten VIs and they have a U8 byte to define what items are present in the flatten data.   Maybe you already tried this based on your message, but one possible workaround would be to embed the 5 bits of version data (would only work up to LV2020 ) from the white paper you referenced into the upper portion of the U8 in the messenger library.  Not sure if drjdpowell would be up for that and not sure if the upper 5bits of that U8 are used for anything else since I only did a cursory check.   Also the added version stuff on the front and backend would add overhead.

    Flatten.jpg

  14. I have a scenario where I'd like to use Messenger to send TCP messages between a LV 2014 machine/app to/from a LV 2016 machine/app.  I started experimenting using the examples provided with the Messenger library.... Starting TCP Control Server (Messenging).vi on the 2016 machine and TCP Control Client (Messenging).vi on the 2014 machine.  On startup, the first message from the client (2014) goes through to the server (2016) fine, but when the 2016 machine replies back the received message on the 2014 machine is not unflattened properly in the "Route Back Reply" case of the TCP Client Actor  and returns an error 122:

    Error 122 occurred at Unflatten From String in SendMSG.lvlib:VariantMSG.lvclass:Unflatten Data.vi:280001->SendMSG.lvlib:MSG.lvclass:Unflatten.vi:3130001->TCP Client Actor.lvclass:Actor.vi:6640001->Dynamic Launch Shell.vi:5450003->Dynamic Launch Shell.vi.ACBRProxyCaller.5F500036

    Possible reason(s):LabVIEW:  The resource you are attempting to open was created in a more recent version of LabVIEW and is incompatible with this version.

    2014 TCP Client Actor error.jpg

    Is there a work around for this or do you have any suggestions for using Messenging library between different version of LabVIEW?

     

  15. 23 hours ago, viSci said:

    Shaun - Thanks for the link.  There is a DirectShow rendering example given for mms video stream but I could not get it to work.  I tried to modify the URL for local media but no luck.  I will try to contact the originator of the library...

    bbean - Yes Blackmagic does have a nice app that works great.  I can use it to stream uncompressed AVI files to my SDI output.  The problem is that I need to do this programatically...

    viSci....I was asking if you can get playback to work through any 3rd party players (not just Blackmagic).  VLC and Windows Media Player have activeX controls that can be used in LabVIEW.  But if your only luck is with the BlackMagic application, then you should probably talk to the vendor.

    Also have you looked at the Developer SDK?

    "Developer SDK
    Available free with all UltraStudio models is an advanced developer SDK free of charge for Mac and Windows. Develop your own custom solutions to use in house or even sell! UltraStudio also includes DirectShow filters, a WDM Windows Driver and QuickTime API that lets UltraStudio models integrate seamlessly with an unbelievably wide range of applications and codecs. Develop your solutions with confidence because UltraStudio is a flexible, proven foundation that free you to work without limitations. "

     

  16. 3 hours ago, viSci said:

    Thanks for the links.  Took a peek but did not see any examples or API's of how to stream video to a directshow output device.

    Whoops.  Sorry bout that.  When you mentioned make AVI files in LabVIEW that was my first thought.  But I made a bad assumption that it also supported playback via video outputs, but it doesn't look like it.  

×
×
  • Create New...

Important Information

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