01-31-2018 10:27 AM
@bsvare wrote:
I've sadly also met my fair share of horrible drivers. A lot of what I encounter are DLL wrapped VIs. Lately, though, I'd be happy to see that vs some of what I have been seeing lately.
For example, the latest driver I got has this "Init" function:
It requires passing in references to controls I don't use, need to know internal of which port is RS232 vs RS485, and Comport and MacID per connection. (Among other Rubes).
In fact, the "driver" is just 4 VIs, Init, Status, State, and Main (Demo VI)
At least the error chain is unbroken! You should have seen what this looked like before.
And it used "VISA.User Data" That's a no-no (Waves finger /\/\//\/)
User Data clears before the vi calling it goes idle (Not saved by VISA as part of the session that you may not need to explicitly open)
01-31-2018 10:29 AM
I will spare you from looking at the entire diagram, so here is just a very small section 😮
01-31-2018 10:46 AM
@bsvare wrote:
I've sadly also met my fair share of horrible drivers. A lot of what I encounter are DLL wrapped VIs. Lately, though, I'd be happy to see that vs some of what I have been seeing lately.
For example, the latest driver I got has this "Init" function:
It requires passing in references to controls I don't use, need to know internal of which port is RS232 vs RS485, and Comport and MacID per connection. (Among other Rubes).
In fact, the "driver" is just 4 VIs, Init, Status, State, and Main (Demo VI)
Oh, that sad and lonely Wait function at the left bottom... 🙂
02-01-2018 07:44 AM
@crossrulz wrote:
But the ones that really irk me are the ones that have DLLs to do simple SCPI commands. Seriously? Couldn't just use the normal VISA functions? Those I am quick to completely throw away and write my own.
Absolutely! We use TESCOM Pressure Controllers here. TESCOM have a DLL. They paid someone to wrap the DLL in LabVIEW VIs and provide that as a LabVIEW driver. I got a hold of the comms protocol to the TESCOM device and wrote a native LabVIEW interface. Now that mine is written in pure LabVIEW, it's portable to cRIO (Linux) etc. Much better
02-23-2018 12:18 PM
Let's really complicate the creation of an array with what is really a 1-D array at the end of the day.
03-01-2018 09:00 AM
03-01-2018 11:06 AM
wiebe@CARYA wrote:
Hmmm... It's exemplary for the rest of the thread (and code):
1. Write LabVIEW Code
2. Find less than 0 devices
3. Get infinite devices!
4. Profit $$$
03-02-2018 08:05 AM
4. Profit $$$
The Ferengi Rules Of Acquisition # 9 "Opportunity plus instinct equals profit."
03-02-2018 08:19 AM
@Gregory wrote:
wiebe@CARYA wrote:
Hmmm... It's exemplary for the rest of the thread (and code):
1. Write LabVIEW Code
2. Find less than 0 devices
3. Get infinite devices!
4. Profit $$$
In his defense...
Only case 1 and 2 did something, 0 was default... (That extra info makes the code less wrong, but 100% redundant!)
03-02-2018 01:38 PM - edited 03-02-2018 01:40 PM
Here's one way to determine if the current code is run as executable (seen here).
Also that uninitialized shift register would be problematic if run more than once during a session.
I am pretty sure there is a better way!