Jump to content

X___

Members
  • Posts

    415
  • Joined

  • Last visited

  • Days Won

    28

Posts posted by X___

  1. 19 hours ago, ShaunR said:

    Chasing the golden geese, it seems.:lol:

    Interesting stuff throughout but the real juice is at about 55mins in the "Distribution of Resources". (Spoiler, it's a small club and we aint in it). The mention of porting Unicode made me laugh heartily though :D. My final takeaway was too many C# coders left over from NXG.

    Seriously: it's over (it actually starts at 54 mins in).

  2. 8 hours ago, Mads said:

    Not sorting the array we are processing, sorting the array of elements to delete. That is done just to facilitate the filtering algorithm, it does not affect the array that is to be processed.

    (Unless the sort has somehow gotten misplaced somewhere in the code that has been bounced around here...)

    My bad, it does not scramble elements 😞 Busy on the side dealing with a lab flood doesn't help with focus...

  3. What are your respective experiences with Python and LabVIEW? It seems that you are more proficient in the former than in the latter. If so, looking at built-in examples might help (Help>>FInd Examples).

    Answer 1: the way the Python node is designed requires a function to call in your script. You can have several functions in a script, but you would have to call the Python node repeatedly, one function call at a time, or those functions would have to call each other within the script. Not that this is what you are asking for, but that might clarify the node's intent.

    Your first snapshot doesn't show any node output. If you want to get something back into LabVIEW, that is missing. If I understand what you are trying to do, you would want your Python function to return something like an array containing your image.

    Answer 2: the easiest way would be to use a Picture control to display the image array returned by the Python node. More expensive (the toolkit is not free) would be to use the Vision Development Module, which in addition to a more advanced control, would offer a number of utilities to manipulate the image.

    HTH

    • Thanks 1
  4. On 1/30/2023 at 12:24 AM, Rolf Kalbermatter said:

    That is partly NI's work. They were pretty aggressive about defending their idea by applying for quite a few patents and defending them too. Of course if you go to the trouble to apply for a patent you have to be willing to defend it, otherwise you eventually loose the right to a patent anyways.

    And they did buy up some companies that had something similar to LabVIEW, such as DasyLab for instance, although in my opinion DasyLab didn't quite go beyond the standard "wire some icons together" similar to what HPVee did, and what Node-Red is doing too. But they tried to use some structures that were darn close to LabVIEW loops and that was a prominent NI patent. So NI eventually approached them and made them the offer to either buy them or meet them in front of a judge. The rest is history.

    Some of the earlier patents (still listed in Help>>Patents...) have long expired. The latest is dated 2014.

  5. On 1/28/2023 at 2:36 AM, Rolf Kalbermatter said:

    There is only a relatively small development team left for LabVIEW, apparently mostly located in Penang, Malaysia, if I interpret the job offers on the NI site correctly and they are probably scared to death about the huge and involved legacy code base that LabVIEW is and don’t dare to touch anything more substantial out of well founded fear to break a lot of things with more involved changes.

    I was puzzled by that statement and since I am unable to do anything more demanding at this time, I checked the job offers at NI. There are 4 sites: Texas, Costa-Rica, Hungary, Malaysia.

    Most of the software-related postings appear to be API and driver related. I would be surprised that any of the frontend software is developed outside a tight-knit group in Austin (especially because NI is not an open source software developer, where delocalization is the rule).

  6. On 1/28/2023 at 8:21 AM, ShaunR said:

    We have a number of programming languages and paradigms at our disposal so why try to shoe-horn everything into Python? Use the right tool for the task. I don't use LabVIEW when writing webserver code.

    Simple: to be understood by and be able to share code with others in academia. I have a few options: python, MATLAB, Mathematica, possibly C/C++ but certainly not LabVIEW. I dabble in all other languages, but in terms of cost and adoption, the choice is easy. I understand that for automation and delivering slick UI to paying customers it might not cut it, but if Emerson drops it, everyone will have to reconsider their options.

    As far as I am concerned, the writing has been on the wall a long time ago as far as LabVIEW was concerned. What saddens me the most is that its graphical paradigm hasn't percolated (much) in other languages (Node-Red and some other experiments being rare and not-so-impressive exceptions).

  7. 4 hours ago, Rolf Kalbermatter said:

    There is only a relatively small development team left for LabVIEW, apparently mostly located in Penang, Malaysia, if I interpret the job offers on the NI site correctly and they are probably scared to death about the huge and involved legacy code base that LabVIEW is and don’t dare to touch anything more substantial out of well founded fear to break a lot of things with more involved changes.

    I wonder whether Emerson knows that, and if so, what their logical conclusion will be moving forward. I mean, I have no doubt what they will decide.

  8. 4 hours ago, Rolf Kalbermatter said:

    Sorry but you are talking nonsense here. I don’t mean the part about Jeff spinning off a new company with that money although I think that’s not very likely, but a Python based LabVIEW is just utter nonsense.

    My bad, I did not fully fleshed my proposal to Jeff K. I did not mean to rewrite LabVIEW in Python, but import some of the graphical concepts of LabVIEW into Python.

    Here is it: develop a Python module that allows representing python code graphically. The execution parallelism implemented in LabVIEW would probably be the trickiest part, but I am not sure I would require it initially. And implement some type and syntax checking breaking the "diagrams" at edit time rather than at compile/runtime (typos is what I hate in text-based languages).

  9. 3 hours ago, Reds said:

    I didn't quote the part where he explicitly states his disappointment with NI's "execution" and how it has lost focus on it's "stakeholders" including customers and partners.  Check out the article and decide for yourself. I mean, he's not wrong if you ask me.

    You mean that sentence:

    Quote

    Truchard said that a combination of poor execution and underinvestment in developing new technologies had allowed rivals to gain ground on the Austin, Texas-based company. 

    I am not sure he means LabVIEW when he thinks "new technologies". After all that is more the purview of Colonel Kodosky...

    Who probably wouldn't mind a few extra 100 million dollars for... what about spinning off G and funding an open source project making a graphical Python-based LabVIEW?

    • Like 1
  10. 8 hours ago, Rolf Kalbermatter said:

    I had the same reaction.

    That's maybe because, according to Reuters (https://www.reuters.com/markets/deals/emerson-makes-76-bln-bid-ni-corp-2023-01-17/),

    Quote

    Last year, Emerson also sold its division that makes waste disposal equipment and hot water dispensers to Whirlpool Corp (WHR.N) and merged its software units with smaller rival Aspen Technology (AZPN.O).

    (company with a green and blue-themed website too...).

    So, their interest is probably not in supporting the development of a niche software that once pretended to be the programming language to run them all (or did it?) but is certainly not anymore.

    A lot of people at NI should probably get busy updating their profiles and checking job offers, if they had not been thinking of it after AQ's departure...

    BTW, I don't quite understand your previous argument that cofounders having a majority of shares would oppose a sale? Why would they not try to get as much money out of the sale and leave their families/heirs with a comfortable fortune to spend the rest of their lives?

     

  11. No. That was my second error in two attempts, so I considered the experiment done for me for the time being.

    I had a similar experience with stabilityai (the graphic AI) where the outputs I got were complete garbage, so I suppose I am just not doing it right and don't have the patience to "play" with the thing.

    Apparently, for pure text stuff, you need to reiterate and massage the question to get something that is acceptable.

    For LabVIEW code, by the way, the latter tool might be more appropriate... or not (try it at https://huggingface.co/spaces/stabilityai/stable-diffusion).

    Here are the results of ("a LabVIEW diagram adding two numbers" - Negative prompt: "not a NXG diagram"):

    image.jpeg.cfbbcd7f3ba3d187afaf24124a5ec179.jpeg

    image.jpeg.c28e3d8b44f4b5c839a4afd6aa7998b2.jpeg

    image.jpeg.3af80f5d271faf088e1c58a740a373c9.jpeg

    image.jpeg.5d2df3bc168f8391d9b17735f3dbec5b.jpeg

     

    One more reason to switch to Python?

     

    • Haha 2
  12. Here is a little fun I had with ChatGPT:

    Me: what is the infinite sum 1-2+3-4+5-6... equal to?
     
    ChatGPT: The infinite sum 1-2+3-4+5-6... is a so-called "alternating series," because the terms have alternating signs. This series does not converge to a single value. In other words, it does not have a sum in the usual sense.
    If we take the first few terms of the series, we can see that the sum oscillates around a particular value and never settles down to a fixed number. For example, if we take the first 10 terms, the sum is -4. If we take the first 100 terms, the sum is 8. If we take the first 1000 terms, the sum is -32, and so on.
    In general, the sum of the first n terms of the series is given by the formula (-1)^(n+1) * (n+1)/2. This formula shows that the sum oscillates between positive and negative values as n increases, and it never converges to a single value.
    It is possible to assign a meaning to the infinite sum of an alternating series by considering the limit of the partial sums as the number of terms goes to infinity. This is known as the "alternating series test," and it can be used to determine whether an alternating series converges or diverges. However, in the case of the series 1-2+3-4+5-6..., the alternating series test cannot be applied, because the terms of the series do not approach zero as the number of terms increases.

    Comment: so far, so good.

    Me: but the sum of (-1)ˆn * n*(1+x)ˆ(n-1), for n = 0 to infinity has a finite value for x = 0 . And that is formally -1 + 2 - 3 + 4 - 5...
     
    ChatGPT: Yes, that is correct. The series (-1)^n * n*(1+x)^(n-1) does have a finite sum when x = 0, and this sum is equal to the infinite sum 1-2+3-4+5-6...
    To see this, we can use the formula for the sum of a geometric series:

    Sum = a * (1 - r^n)/(1 - r)

    where a is the first term of the series (in this case, a = -1), r is the common ratio (in this case, r = -1), and n is the number of terms in the series.

    If we plug in the values for a, r, and n and set x = 0, we get:

    Sum = (-1) * (1 - (-1)^n)/(1 + 1) = (-1) * (2 - (-1)^n)/2 = (-1)^(n+1) * (n+1)/2

    This is the formula we obtained earlier for the sum of the first n terms of the series 1-2+3-4+5-6....

    So, the sum of the series (-1)^n * n*(1+x)^(n-1) when x = 0 is indeed equal to the infinite sum 1-2+3-4+5-6...

    Comment: the sum is not that of a geometric series. It is the first derivative of sum (-(1+x))ˆn) = 1/(2+x), so the derivative is -1/(x+2)ˆ2. Of course, this requires 1+ x < 1.

    Me: That's wrong. The formula is sum of (-1)ˆn * n*(1+x)ˆ(n-1), for n = 0 to infinity equals -1/(x+2)ˆ2. Therefore -1 + 2 - 3 + 4 - 5... = -1/4

    Comment: In retrospect, that may have been a bit too blunt for a US-trained AI...

    ChatGPT: I apologize for the mistake in my previous response. You are correct that the sum of the series (-1)^n * n*(1+x)^(n-1) for n = 0 to infinity is equal to -1/(x+2)^2 when x = 0.

    To see this, we can use the formula for the sum of an infinite geometric series:

    Sum = a/(1 - r)

    where a is the first term of the series (in this case, a = -1) and r is the common ratio (in this case, r = -1).

    If we plug in the values for a and r and set x = 0, we get:

    Sum = (-1)/(1 - (-1)) = (-1)/(1 + 1) = -1/2

    Then, we can use the formula for the sum of an infinite series in which each term is the product of a constant and a series:

    Sum = a * Sum(b)

    where a is the constant (in this case, a = n) and Sum(b) is the sum of the series b (in this case, b = (1+x)^(n-1)).

    If we plug in the values for a and Sum(b) and set x = 0, we get:

    Sum = n * (-1/2) = (-1)^n * n * (-1/2) = (-1)^n * n/(-2) = (-1)^n * (-1/2) * n

    This is the series (-1)^n * n*(1+x)^(n-1) for n = 0 to infinity.

    Therefore, the sum of this series when x = 0 is indeed equal to -1/4, as you stated.

    Again, I apologize for the error in my previous response. Please let me know if you have any further questions.

    Comment: if that sound like gibberish to the non-mathematically versed reader, that's because it is.

    Me: yes I do. How come an infinite series that oscillates and seems to diverge in absolute value, as you pointed out, can converge to a finite value?

    ChatGPT: An error occurred. If this issue persists please contact us through our help center at help.openai.com.

  13. 1 hour ago, Phillip Brooks said:

    I agree. The Python Node seems to promote the 'warning code' to an 'error code', even after executing the Python function name successfully. 🤔

    Thanks for clarifying that. I forgot to mention that this "feature" has indeed nothing to do with what happens in the Python function itself (which could be a simple return() statement). And that I tested this in LV 2021 SP1.

    I haven't tested this with the Matlab node (which is way worse than the Python node, as it loses connection with the Matlab instance as soon as an error is thrown, requiring the process to be killed in the Windows Task Manager, while at least in the Python node, you get the Python error code and message as part of the error cluster and - generally, but not always - can recover from this and reuse the Python session refnum).

    Let's say I wouldn't be shocked if the same feature existed.

    This being said, the workaround is straightforward: store the error in before calling the node, and if it is a warning, pass a no error to the node, and merge the error cluster output of the node with the stored error in before continuing.

×
×
  • Create New...

Important Information

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