Jump to content

ThomasGutzler

Members
  • Posts

    205
  • Joined

  • Last visited

  • Days Won

    23

Posts posted by ThomasGutzler

  1. Down here, you can't really hire a good LabVIEW programmer; all 10 of them have jobs they don't want to leave, so you'll just have to make your own. That's often easiest if that person has no LV experience. In that case you know they haven't been poisoned by "that uni course" they did where most certainly single-vi spaghetti with lots of local variables for "storing data" was the result. Candidate must have good understanding of generic concepts and not make a face when quizzed about graphical programming

    • Like 1
    • Haha 1
  2. 5 hours ago, joerghampel said:

    ...and for what it's worth, we use G-CLI, which sets the "App.UnattendedMode" property. That seems to be all it needs. G-CLI also allows to kill the LabVIEW process after some timeout in case it should hang.

    Thanks for the insight! G-CLI has been on my to-look-into list for a while. Haven't had the time yet.
    At the moment our only timeouts come from the build pipelines, which means if something goes wrong the pipeline fails and the developer has the press the "try again" button (After inspecting the build log to check if it's a true fail or not). Not the end of the world if the second build works.

  3. On 4/24/2021 at 2:32 AM, joerghampel said:

    Answering the question in this post's title: Yes!

    It's a commercial product, but you might get some inspiration from the information on the product website at https://rat.hampel-soft.com. 

    Thanks Joerg, I've seen your website before. Probably while I was looking for solutions.

    I guess, in theory, my stuff works too. It's just the pain of debugging when things don't go as they should because LabVIEW decided to corrupt its compiled objects cache, or that build error that we get when we have the build folder open while it's building that sometimes happens even that folder isn't open, or solar flares...

    The fact that I can't debug a build that froze or do anything useful with an instance that got started programmatically and isn't finishing just opens this immense guessing game. I don't like it.

  4. We've been building executables and vipm packages on Azure for quite a while now and most builds work. Our driver package (6500 files) takes about 45 minutes on a pretty low spec PC. Applications usually build within 10 minutes.

    All our builds are LabVIEW 2018 64bit though, no multi-version doom. But there's no reason why you couldn't build multiple versions.

    With Azure build pipelines you have the choice of either self-hosting your build server or using an Azure VM which you have to install the complete toolchain on. Azure VMs can spin up/down on demand which is supposed to save you money because you only pay for the time they're up. We're not doing that.

    Another cool thing is unit testing. The caraya test framework integrates nicely and posts your test results stright to the pipeline. More here: https://forums.vipm.io/topic/3293-unit-testing-with-azure/

    Happy to share more thoughts - probably in a different thread or PM

    • Like 2
  5. Hi,

    I've been working on this for years but I still haven't managed to set up a build server that builds reliably.

    My inputs are a vipc file and a .lvproj with all relevant files checkout via git. From there it's a two-step process. A powershell script makes 2 separate calls to labview using two small helper vis:

    1.) apply vipc file using VIPM API; close labview entirely

    2.) build the project given a build spec name

    In the end of step 2 it comes down to this

    image.png.251e7518723cea383582a9662da75719.png

    And I have no idea if the last 2 steps are needed but I'm definitely trying to work around problems there, such as:

    - some files have changed, because LabVIEW can't just open a project without touching it. So I need to save everything to avoid the "Don't you want to save" dialog blocking everything

    - I can't remember what the "Exit" is for

    I've played with clearing the build and compiled object cache before every build. I've just turned off automatic recovery saving on my build servers. But I still find myself with builds that just never finish. Often, the last line in my build log is "Attempting to build <whatever>". Of course there is no way to debug a build that's gone wrong because I can't just remote into the build server and look at what's going on because the labview instance that's been started by the build pipeline isn't visible on my desktop even though it's the same user. So all I can do is manually restart, and in most cases that fixes the problem. Of course, the problem is not fixed then ...

    Sometimes I remote into the build server and I see a vipm crash handler window. Sometimes I get the old "Sorry for the inconvenience" thing from labview but nothing is ever repeatable

    Are there any other recommended settings? Should I mark all files as read-only to stop labview from touching them?

    Any tricks, recommendations or other mildly related wisdom?

  6. I remove all compiled code from my vis and rarely see problems with it. Nothing that can't be resolved by clearing the compiled object cache. However, I found that the project-level check box doesn't work properly, so I wrote my own quick drop plugin that goes through the project to fix everything up.

    In VIPM I usually keep the mass compile option after install checked, except for our build servers because they install a different set of packages with almost every build and it takes longer to mass compile everything.

    Remove Compiled Code.vi

  7. On 11/21/2020 at 2:30 AM, Matt_AM said:

     

    @ThomasGutzler What do you mean by "Returning different data types from classes of the same instrument type is something you don't want."?  I'm assuming you mean something like use the parent "Power Supply" object for my connector panes and define the child (such as TDK Lambda) during the initialization section of my test.  This way the if I wanted to change the PS from TDK Lambda to say Sorenson, all I'd have to do is change the test's initialization section since all my connector panes are using the Power Supply parent class in their connector pane.  If this is the case, I am doing that already, I may just be bad with my vocabulary.

    What Neil said. Looks like you've got it worked out.
    The hardest thing to get your head around is the factory instrument creation. This is the only place where you might not use dynamic dispatch to call instrument specific vis containing their specific configuration. But as @drjdpowell said, you can use JSON for that.

  8. Factory is a good way to create your instruments but you probably want one factory for all instruments rather than one for each type. That way you only pass the parent (abstract) reference around, which makes it easy to swap out one concrete instrument for another of the same type. Returning different data types from classes of the same instrument type is something you don't want. When designing your classes, you should already know what kind of data you expect that class structure to handle and all instruments of one type should be able to put their data into that one given format.

    Maybe @MikaelH can throw the Introduction to OpenGDS pdf your way. I can't find it.

     

  9. Ok, I obviously got fooled by the abstraction of the VISA driver.

    The reason why my initial code "works" is that I never enabled the Term Char. Without looking up the details of the communication protocol over USB I'm assuming that it contains some sort of "message end" that isn't a term char but is understood by VISA. Otherwise, I'd be getting timeout errors on the 65535 byte reads.

    Nevertheless, I have changed my reads to the suggested method (but without term char enabled) and queried the scope using the old method until I got another timeout. And there is no timeout using the new method. This makes no sense to me knowing term char is disabled.

    Finally, regarding the 1 byte vs. 2 bytes at the message end. All messages I'm getting end on "0A" but not "0D0A".

    image.png.60817cb83e37bb44347fd7ec256acd0f.png

  10. Hi,

    I'm connecting to a Rigol DZ1000 Oscilloscope via USB and using the :DISP:DATA? ON,0,PNG command to grab a screenshot. Reading out the data in blocks of 65535 bytes until there is no more (see attached vi).

    This normally works fine but yesterday I was getting a timeout error. I fired up IO Trace and got this:

    > 783.  viRead (USB0::0x1AB1::0x04CE::DS1ZA201305475::INSTR (0x00000001), "#9000045852‰PNG.......", 65536 (0x10000), 45864 (0xB328))
    > Process ID: 0x000039C8         Thread ID: 0x00001760
    > Start Time: 13:13:54.1169      Call Duration 00:00:10.4323
    > Status: 0xBFFF0015 (VI_ERROR_TMO)

    You can see that 45864 bytes were received, which is exactly what was specified by the binary data header (45852 data bytes + 11 header bytes + 1 termination char)

    I dumped the reply string into a binary file and set the scope to run so it show something else on the screen. Sure enough the error went away. I also dumped a good result into a file. Then I tried to figure out what the problem may have been but I didn't get anywhere. Any ideas? Sure looks like a bug in VISA read or perhaps an incorrectly escaped reply from the scope?

    It's very easy to "convert" the reply into the screenshot - just remove the leading 15 bytes (4 bytes from WriteBinayFile and 11 bytes from the scope header). And yes, both data files display just fine as PNG. I don't think PNG does internal checksum so byte errors would be hard to spot.

    Any ideas what could have caused that timeout?

    snip.png

  11. Help

    Is there a way to parse this JSON string into this cluster in the following way:
    image.png.4ca6fc2304370ea4d98288a6434e8ad6.png

    - The order of elements inside the "Parameters" cluster does not matter. No error
    - I can use enums
    - The name of the elements matter. "TWOoo" shouldn't end up populating "two" (even if the order of elements matches the cluster). I want an error here instead of "two" being the default value
    - Don't care if JSON text has additional elements that aren't in the cluster. No error

    In short, features: Strict name checking, order independence, error if element missing

    I've tried so many things but they all fail in one way or the other. See attached snippet

    snip.png

    • Like 1
  12. 17 minutes ago, TomOrr0W said:

    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 Hoover's original attachment is also listed as unavailable.

    I can download them both. Maybe you need to have an account for the download to work. I had to create an account to be able to upload.

×
×
  • Create New...

Important Information

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