03-14-2018 10:54 AM
I love how we are having a conversation about who's producing a more efficient Rube. The irony.
"I won't be wronged. I won't be insulted. I won't be laid a-hand on. I don't do these things to other people, and I require the same from them." John Bernard Books
03-14-2018 11:05 AM
It's good to be self aware, and not take yourself too seriously. Those are the people that are usually the ones most open to seeing things a different way, or changing for the better. That being said if you post some of my code as a Rube my knee jerk reaction will be to defend it.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
03-19-2018 10:26 AM
Interesting implementation of a Producer/consumer. Lets use a string as a command, but transmit the data as a local variable! 😄
Seen here: https://www.laserquantum.com/download-ds.cfm?id=885
Well, you can even buy the software: https://www.laserquantum.com/products/detail.cfm?id=60
(well, I hope the driver was made by an intern, and the sold product got cleaned up...or not... 🙂 )
03-21-2018 10:09 AM
Per a suggestion, this piece of thread on improvements of code moved to LabVIEW board.
03-23-2018 08:40 AM - edited 03-23-2018 08:43 AM
Lots of fun to rewrite an old application. I find "interesting" code parts every day! 🙂
Interfacing a RS232 chiller. Error status response in 1 byte:
Implementation:
Ok, lets check for hexa values to capture error. The only problem, what if more than 1 error flag is present in the byte? Magic! No error! 😄
Fixed version:
Another interesting approach: the device expects the temperature setpoint to be sent as 2 bytes hexa string. Lets convert it this way: 😄
Would not be easier this way? :
03-23-2018 09:55 AM - edited 03-23-2018 09:56 AM
@Blokk wrote:
Instead of the Type Cast and the Reverse String, use Flatten Into String. It has an input for setting the endianness (set it to Little Endian).
03-23-2018 10:16 AM
This is the classic case when posting a "fix" for a Rube-Goldberg construct is actually also a little Rube-Goldberg! 😄
Thanks crossrulz! 🙂
03-23-2018 12:09 PM
@Blokk wrote:
This is the classic case when posting a "fix" for a Rube-Goldberg construct is actually also a little Rube-Goldberg! 😄
Thanks crossrulz! 🙂
Well, here's another thing. You can make that VI a little more efficient by not using the Case Structure around the code. In the event of an error, none of the VISA functions will actually run. But you are optimized for when an error occurs instead of when there is no error. Which will happen A LOT more than the other? I sure hope it is the no error case. For more information see here: An End to Brainless LabVIEW Programming (there are some other really good things in that presentation).
03-23-2018 12:34 PM - edited 03-23-2018 12:35 PM
@crossrulz wrote:
@Blokk wrote:
This is the classic case when posting a "fix" for a Rube-Goldberg construct is actually also a little Rube-Goldberg! 😄
Thanks crossrulz! 🙂
Well, here's another thing. You can make that VI a little more efficient by not using the Case Structure around the code. In the event of an error, none of the VISA functions will actually run. But you are optimized for when an error occurs instead of when there is no error. Which will happen A LOT more than the other? I sure hope it is the no error case. For more information see here: An End to Brainless LabVIEW Programming (there are some other really good things in that presentation).
Yes. Starting a subVI always with an Error case around became kind of habit for me. But I guess the speed penalty doing this in usual codes are negligible (but of course I just do not need error cases for such VIs, that is for sure!)...
edit: and the presentation is very good!
03-28-2018 08:47 AM
@Blokk wrote:
@crossrulz wrote:
@Blokk wrote:
This is the classic case when posting a "fix" for a Rube-Goldberg construct is actually also a little Rube-Goldberg! 😄
Thanks crossrulz! 🙂
Well, here's another thing. You can make that VI a little more efficient by not using the Case Structure around the code. In the event of an error, none of the VISA functions will actually run. But you are optimized for when an error occurs instead of when there is no error. Which will happen A LOT more than the other? I sure hope it is the no error case. For more information see here: An End to Brainless LabVIEW Programming (there are some other really good things in that presentation).
Yes. Starting a subVI always with an Error case around became kind of habit for me. But I guess the speed penalty doing this in usual codes are negligible (but of course I just do not need error cases for such VIs, that is for sure!)...
edit: and the presentation is very good!
If you go back through this thread.... You will find the penultimate case