Jump to content

TomOrr0W

Members
  • Posts

    40
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by TomOrr0W

  1. During Q&A in one of his "An End to Brainless Programming" presentations, @Darren mentioned that classes wrapping any references should only contain references (From the 2020 GLA Summit - see https://youtu.be/pS1UBZzKl9k?t=1741).  This makes sense to me to some degree, as usually you don't want any associated data to be no longer synchronized with an internal reference after branching a wire.

    It is still a new concept to me, though - if people are willing, I would like to hear more discussion/reasoning on the topic before I wholeheartedly adopt it as a personal rule.

    Do you know of any other forum posts/whitepapers/recorded presentations on the topic - @Darren mentioned @Aristos Queue having talked about this before?  Do you agree with this as a general rule?  I assume that any classes containing an object that wraps references also should only contain references - is this correct?  Should this rule also apply to normal clusters containing references?  Can you think of any exceptions that might make a class with both value and reference data appropriate?

    I did look through some NI APIs for exceptions, and found a couple in the Actor Framework's message classes: Actor Framework.lvlib:LastAck.lvclass wraps a by-val error cluster along with some objects containing only references (Actor.lvclass and Message Enqueuer.lvclass); Actor Framework.lvlib:Launch Nested Actor Msg.lvclass wraps a by-ref actor.lvclass with some by-val data.

  2. 19 hours ago, ThomasGutzler said:

    I replied with an example on the relevant thread on the JKI forum

    You might want to post a link to this thread in that thread.  The attachment is listed as unavailable - the error message says "This attachment is not available. It may have been removed or the person who shared it may not have permission to share it to this location".  Brian's original attachment is also listed as unavailable.

    Maybe that was JKI's problem all along - they wonder why no one sends them examples while not realizing that they don't allow anyone to post code.

  3. 15 hours ago, drjdpowell said:

    I think I can fix this by making the last case of the Type-Specialisation Structure be a case that passes the Buffer input to Buffer Output.  I make sure this last case is broken, so it is only used for type propagation when all cases are broken.

    1036499143_TypePropagationwhenallcasesbroken.png.c53f24c7bb28bb8a08b6427f9e61760b.png

    If you do this, you still end up with a broken buffer wire (you just also get a broken data wire if you choose to incorrectly wire in a scalar).  Note that the type of the output wire now matches the input wire now instead of being a DVR.  I am using LV2019 64-bit in case 2018 32-bit has a different implementation.

    If you then convert the malleable vi to an instance vi or copy the type specialization node into the top-level vi, both wires unbreak.  Also note that nothing changes if you also do the same change (adding a third case with a passthrough on top and broken data wire on bottom) on the Add to Buffer (By Value).vim called in the Type Specialization [0] and [1] cases.
    400424022_ResultofExtraCase.png.8094ae0c62964a6c478f9d9b47027403.png

  4. Hi Cat,

    I haven't tried an offline install or non-standard location install of any of the NIPM products yet, so I can't help you on the main issues.  Wiping all prior NI software (one thing NIPM makes easy is uninstalling everything but itself) before installing LV2019 seemed to work well for me on a couple testers.

     

    You mentioned LV2019 SP1, which might have some more caveats for offline installs.  NI changed their license manager again with that version - I would be interested to see if it works offline at all (there seems to no longer be a way to cancel the activation login dialog and enter codes, but maybe something will change when offline):

    https://forums.ni.com/t5/Volume-License-Manager-and/NILM-4-5-Feedback-Questions/td-p/3984686

    I've felt for a while now that the NI License Manager 4.x versions are vastly inferior to the 3.x versions.

  5. I played around with the continuous and finite examples using a 9205 (mine is in a 9178 chassis, but that shouldn't matter), and analog start triggers configured on the same AI as the task's first channel seem to work for RSE continuous measurements, but not differential measurements.  They also seem to work for Differential finite measurement, but trigger off the channel configured, not the differential pair.  Continuous differential measurements exhibit the same behavior in NI's examples as in your code.

    A continuous measurement doesn't make much sense for your application, as you are only measuring once after the trigger.

    Once you do get triggering working, you may be able to use DAQmx connect terminals to route the AnalogComparisonEvent (you can find this if you enable advanced terminals in the I/O Name Filtering) to another card, which could then be used to drive circuits without any software timing involvement.  If you change to the 9178 or 9179 chassis, one of these terminals could be the BNC connections on the chassis itself.

  6. Try running VIPM as an administrator.

    I have had similar issues happen when trying to install packages that were cached from the tools network by another user.  Cached packages (and some other VIPM settings, I would assume) are stored in %ProgramData%, and Windows 10 seems to think that you shouldn't be able to access files in program data created by (in this case downloaded by) another user.

  7. I am able to set panels to 1x1 in Windows 10, LabVIEW 2016-2018.  Note that the VI saves with size 1x1, but the panel widens to show the run button when you open the vi.

    In some subpanel code I am working on in LabVIEW 2016, I found that any pane containing subpanels set to fit control to pane can't shrink below 5x5 without throwing error 1.

    Panel Size Debug 2016.vi

    Panel Size Debug 2017.vi

    Panel Size Debug 2018.vi

    Panel Size Debug Subpanels 2016.vi

  8. 3 hours ago, Michael Aivaliotis said:

    Second bottleneck, and the biggest hurdle, is that in order to subscribe to a repo you need a Pro license.

    Has JKI ever mentioned why they chose to have this restriction?

    I would ask the question on their forums, referencing this thread, but I don't really want to keep track of another forum account just to ask one question.

  9. My apologies if this is browser-specific (I am using Microsoft Edge).

    I have noticed that topics being moved to another forum make it so their original forum stays marked as unread even after you click on all the topics (including the moved one).  You can use Mark Site Read to clear this state, but it seems like a forum bug.
     

    Example below:
    All LabVIEW General topics have been read but a topic was recently moved (in the red box):
    1977830269_LabVIEWGeneralForumallRead.thumb.png.2a66e475c72896742e9a6abd98cd75cb.png

    Yet LabVIEW General is listed as unread on the main page:

    1194007296_UnreadonMainPage.thumb.png.383d3b9790520a7396b4bb29bc920586.png

    and the Software and Hardware Discussions Page:
    1826666558_UnreadonSW-HWDiscussions.thumb.png.382b4b164d383c3ee7522ebc940d9056.png

  10. Assuming your pulse is a pulse on the strain gauge itself and not the lightbar, the specifications of the hardware you selected should be capable of capturing a pulse in that range.  I would recommend taking buffered measurements with a Windows system.  If you need to react to this pulse as it occurs, you may need a real-time system instead.

    The NI 9237 can capture at 50 kS/s (or 20 us per sample) - http://www.ni.com/pdf/manuals/374186a_02.pdf.  This is more than enough to detect your pulse without aliasing (>2 times the frequency) and to give a decently accurate representation of the signal (>10 times the frequency - http://www.ni.com/white-paper/13655/en/).

    The NI 9425 is less clear, but it appears to be able to measure down to 8 us per sample - http://www.ni.com/pdf/manuals/373782b_02.pdf.  However it may not be capable of buffered measurement (https://forums.ni.com/t5/Digital-I-O/Can-NI-9425-DI-be-buffered/td-p/3368527).

    • Like 1
  11. I can confirm this with LV2009 (32-bit) and LV2018 f1 (32-bit).  This is from fresh vis, not copying one of the snippets in the thread.

    For Darren, if you try to wire from the constructor, you cannot find the terminals.  It is only if you create another object and try to wire it to the constructor that you can connect to the terminals (or if you try to wire one of the other terminals on the constructor to the hidden ones).  Also, their vertical location is in the center of the constructor, so if you are trying to connect to the top, it will appear that they don't exist.

    • Like 2
  12. If I am reading the directions correctly, you can break this reading up into sections:

    (character 1) T1 Polarity = +

    (characters 2-7) T1 Value = 0x0056A4 = 22180

    (character 8) Thermocouple Type = K

    (character 9) T2 Polarity = +

    (characters 10-15) T2 Value = 0x005640 = 22080

    (character 16) Unknown = _

    (character 17-22) Timer =000353

    (character 23-30) Meter Status = ________

    (character 31) = Carriage Return (part of a new line character)

    (character 32) = Line Feed (also part of a new line character)

     

    The calculation shown is to convert a hex value to a decimal value and scale it into an actual temperature (divide by 1000).  Mentioning MSD and LSD is just so you can order the Hex value correctly when converting to decimal.

    0x0056A4 = 0 * 16^5 + 0 * 16^4 + 5 * 16^3 + 6 * 16^2 + A * 16^1 + 4 * 16^0 = 0 * 1048576 + 0 * 65536 + 5 * 4096 + 6 * 256 + 10 * 16 + 4 * 1 = 0 + 0 + 20480 + 1536 + 160 + 4 = 22180

    Your temperatures are 22.180 and 22.080 (not sure what unit; probably degrees Celsius).

     

    In LabVIEW, you can use code similar to the following to make the conversion:
     

    Conversion Example.png

    Conversion Example.vi

    • Like 1
  13. Does anyone have a method for preventing a class from being inherited by other classes in LVOOP?

    This question came up while researching Object-Oriented API Design guidelines, one I came across in text-based languages was "Design and Document for Inheritance or Else Prohibit it" (see Slide 26 of http://lcsd05.cs.tam...des/keynote.pdf; there is also a video of the presentation on YouTube). In the case of classes that are reused within a team or publicly distributed, the issues discussed there with changing implementation details in the class being distributed potentially breaking children seems to still be valid in LabVIEW.

×
×
  • Create New...

Important Information

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