EmbeddedRelated.com
Forums

Labview vs. C++

Started by Tim Wescott July 20, 2016
Tim Wescott  <seemywebsite@myfooter.really> wrote:

>On Thu, 21 Jul 2016 00:17:30 +0000, Steve Pope wrote:
>> Tim Wescott <seemywebsite@myfooter.really> wrote:
>>> I'm trying to decide how hard I need to push, early on, for the >>> computationally intensive bits to be done in C++.
>> I would say, not at all, unless you think your failure to steer them on >> the issue might cause the project to collapse and negatively impact your >> future revenues; but even in this scenario you do not want to directly >> challenge their internal technical approach.
>My job is to point them in the direction of success. If that means that >using the computing language they're comfortable with won't lead to >success, then I need to point that out to them -- even if they don't like >it. I won't beat them with a stick, but they need to understand.
>> I would recommend proposing to include a C++ program among your >> deliverables to them, so that they have a reference implementation. You >> may also want to propose a certain number of your hours as post-delivery >> support.
>They specifically don't want to pay for that -- there will be a Scilab >program, but that has run-times roughly comparable to Labview.
I have run into analogous situations where the customr wants me to deliver an algorithm, but does not want even sample code as this means (in their thinking) that they are paying for coding it twice. So all they get is a paper design. (Even though I have coded it up anyway.) The customer is always right. :-) Steve
> Why? Because for an ethical businessman the _goal_ is customer success. > Money is just the byproduct that feeds the kid and staves off the bank.
Well said. It's how you keep a customer. It's just that simple. JJS
Tim Wescott <seemywebsite@myfooter.really> writes:
>> proposing to include a C++ program > They specifically don't want to pay for that -- there will be a Scilab > program, but that has run-times roughly comparable to Labview.
I wonder if you could estimate without too much effort how much calculation is required, and then ask the customer to run a simple benchmark in Labview that calculates about that much, to see whether it can keep up.
On Thu, 21 Jul 2016 12:30:49 -0500, Tim Wescott
<seemywebsite@myfooter.really> wrote:

>On Thu, 21 Jul 2016 00:17:30 +0000, Steve Pope wrote: > >> Tim Wescott <seemywebsite@myfooter.really> wrote: >> >>> Problem: I'm working on a proposal for a customer, for an app that's >>> going to require heavy computation and is more or less real time*. The >>> guy I'll be working with the closest is pretty much a 100% LabView >>> programmer -- he just doesn't _do_ C, or C++, or Fortran. >> >>> The customer wants me to deliver them an algorithm, to which they'll >>> write code. They're pretty firm (for good reason) on wanting to do the >>> code in-house, or with local talent. >> >> Sounds good >> >>> I'm trying to decide how hard I need to push, early on, for the >>> computationally intensive bits to be done in C++. >> >> I would say, not at all, unless you think your failure to steer them on >> the issue might cause the project to collapse and negatively impact your >> future revenues; but even in this scenario you do not want to directly >> challenge their internal technical approach. > >My job is to point them in the direction of success. If that means that >using the computing language they're comfortable with won't lead to >success, then I need to point that out to them -- even if they don't like >it. I won't beat them with a stick, but they need to understand.
I think that's all you can do, that is, make a recommendation. Sometimes you can write parts of it in red ink, with big arrows pointing at it, but that's really all you can do. If the client doesn't want more than that, then that's where you stop. I've had to do that on a number of occasions, where you kinda knew things were ultimately gonna go badly, but you did your part as requested. It's never fun or easy. Sometimes you get to charge extra to come back and clean things up later. ;)
>> I would recommend proposing to include a C++ program among your >> deliverables to them, so that they have a reference implementation. You >> may also want to propose a certain number of your hours as post-delivery >> support. > >They specifically don't want to pay for that -- there will be a Scilab >program, but that has run-times roughly comparable to Labview.
I think that's a good place to leave it, in other words, provide a well-documented algorithm with lots of stated caveats about execution time and latency in the feedback paths, and leave it at that.
Tim Wescott <seemywebsite@myfooter.really> wrote:

> > Anyway if they want the algorithm and want to do the implementation in > > house, well it's not your problem. > > My "problem" isn't to meet the terms of the contract and successfully > demand payment. My "problem" is to help my customer succeed. > > As an entirely-to-the-point example, the one time that I've ever rebuilt > a trailer hitch was when a customer of my father's showed up with a > slammed '50 Merc and a trailer, to pick up a car body he'd just bought. > The trailer hitch was such a disaster that my dad told him we wouldn't > load the trailer until it was up to snuff. > > Then he detailed me to wallow around in the gravel underneath the car, > with about a foot of room (because the TALL jackstands were in use) > redesigning and rebuilding the trailer hitch so that it'd make the trip > back to the guy's house. (Thanks, Dad). > > Why? Because for an ethical businessman the _goal_ is customer success. > Money is just the byproduct that feeds the kid and staves off the bank.
then implement the algorithm in C++ and give it to them for free. that probably what they want in the end. and probably for the next job they'll go elswhere. Unfutunately there aren't a lot of "ethical businnessman" around, they all starved to death. Bye Jack -- Yoda of Borg am I! Assimilated shall you be! Futile resistance is, hmm?
On Thu, 21 Jul 2016 12:13:19 -0700, Paul Rubin wrote:

> Tim Wescott <seemywebsite@myfooter.really> writes: >>> proposing to include a C++ program >> They specifically don't want to pay for that -- there will be a Scilab >> program, but that has run-times roughly comparable to Labview. > > I wonder if you could estimate without too much effort how much > calculation is required, and then ask the customer to run a simple > benchmark in Labview that calculates about that much, to see whether it > can keep up.
I plan on doing that at any rate. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com I'm looking for work -- see my website!
On Thu, 21 Jul 2016 07:11:26 -0700 (PDT), Jack <jack4747@gmail.com>
wrote:

>Il giorno gioved&#4294967295; 21 luglio 2016 08:20:39 UTC+2, Nasser M. Abbasi ha scritto: > >> There are many more studies that indicate the same. Sure, there >> are area where C or C++ is still faster, but it will be >> few percentage points faster in those cases if any, not >> multiple of magnitudes faster. The days when Java was slow are >> long behind us. Choice between C/C++ and Java these days > >Java is still slow (er than native programs), but only when it has to >interact with things outside the VM (OS, UI, files,...).
And code for things outside the VM can't be written in Java. George
Tim Wescott wrote:
> OK. Neither of the groups to which I'm cross-posting this are > appropriate. > > But, y'all are smart, and I know who to listen to. > > Problem: I'm working on a proposal for a customer, for an app that's > going to require heavy computation and is more or less real time*. The > guy I'll be working with the closest is pretty much a 100% LabView > programmer -- he just doesn't _do_ C, or C++, or Fortran. > > The customer wants me to deliver them an algorithm, to which they'll > write code. They're pretty firm (for good reason) on wanting to do the > code in-house, or with local talent. I'm trying to decide how hard I > need to push, early on, for the computationally intensive bits to be done > in C++. > > I just Googled, and didn't find any good references on the relative > speeds of doing things in some compiled language vs. Labview. If the > ratio is similar to what you get in Scilab or Matlab, then they need to > go with C++. > > So -- anyone know? Any comments? > > Thanks. > > * It's not 100% hard real time, with an "exceed and you die" sort of > deadline, but after the nominal deadline the slope of the user-crankiness > vs. delay curve is pretty steep. Moreover, while _occasional_ delays > could be tolerated, if the computer just can't keep up then the delays > will grow ever longer -- and the user ever crankier -- with time. >
I once worked a few weeks of a summer for a guy who tried to use a 40-horse Ford to move big sandstone rocks. I had one conversation with him about the sound of the hydraulics popping, and made it clear I'd keep a minimum safe distance while he was doing that. LabView claims to have some flavor of CUDA support. So there's that. -- Les Cargill
Tim Wescott submitted:
|------------------------------------------------------------------------|
|"[. . .]                                                                |
|                                                                        |
|I just Googled, and didn't find any good references on the relative     |
|speeds of doing things in some compiled language vs. Labview.  If the   |
|ratio is similar to what you get in Scilab or Matlab, then they need to |
|go with C++.                                                            |
|                                                                        |
|[. . .]"                                                                |
|------------------------------------------------------------------------|

It does not need to be in C++. VHDL and Ada are fast.

Regards,
Colin Paul de Gloucester
On 2016-07-20 23:57:00 +0000, Tim Wescott said:

> OK. Neither of the groups to which I'm cross-posting this are > appropriate. > > But, y'all are smart, and I know who to listen to. > > Problem: I'm working on a proposal for a customer, for an app that's > going to require heavy computation and is more or less real time*. The > guy I'll be working with the closest is pretty much a 100% LabView > programmer -- he just doesn't _do_ C, or C++, or Fortran. > > The customer wants me to deliver them an algorithm, to which they'll > write code. They're pretty firm (for good reason) on wanting to do the > code in-house, or with local talent. I'm trying to decide how hard I > need to push, early on, for the computationally intensive bits to be done > in C++. > > I just Googled, and didn't find any good references on the relative > speeds of doing things in some compiled language vs. Labview. If the > ratio is similar to what you get in Scilab or Matlab, then they need to > go with C++. > > So -- anyone know? Any comments? > > Thanks. > > * It's not 100% hard real time, with an "exceed and you die" sort of > deadline, but after the nominal deadline the slope of the user-crankiness > vs. delay curve is pretty steep. Moreover, while _occasional_ delays > could be tolerated, if the computer just can't keep up then the delays > will grow ever longer -- and the user ever crankier -- with time.
There is a LabView to C convertor available from NI. See http://sine.ni.com/nips/cds/view/p/lang/en/nid/209015 Mike