07-21-2017 01:53 PM
So, I was working on a project today, and came across this little (seeming) oddity while trying to read from a TDMS file.
For the current application, I'm moving around Group/Channel pairs in a single string with a (:) delimiter... So essentially a string which says "Group:Channel" . When I want to read / write this channel, I figured I'd just pass it through a match pattern VI, and pass the two substrings into the "Read TDMS.vi"
Well... surprisingly this doesn't seem to be allowed. It creates a broken arrow on the "Channel" input wire, saying that the types "String" and "(Sub)String" don't match.
This does not happen for the "Match Regular Expression" VI, and a seeming workaround is to just put in a "Type Cast" block... See attached snippet.
I might be missing something here, but this seems to be an error of some sort. This behavior occurs in both 2015 & 2017 (32-bit). Snippet is 2017,
07-21-2017 02:29 PM
@jyoung8711 wrote:
...
Well... surprisingly this doesn't seem to be allowed. It creates a broken arrow on the "Channel" input wire, saying that the types "String" and "(Sub)String" don't match.
This does not happen for the "Match Regular Expression" VI, and a seeming workaround is to just put in a "Type Cast" block... See attached snippet.
I might be missing something here, but this seems to be an error of some sort. This behavior occurs in both 2015 & 2017 (32-bit). Snippet is 2017,
That smell like a bug.
The type-cast is probably a valid work-around
Ben
07-21-2017 03:43 PM
I'm betting an always copy will fix this too.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
07-21-2017 03:53 PM
@Hooovahh
You are right, always copy works.
So does Concatenate.
mcduff
07-21-2017 04:27 PM
Thanks for the feedback! I'll go ahead and submit this as a bug.
I like the both of the workarounds posted here more than the type cast. I only really use that function when it's absolutely necessary... I don't feel that I always know what it's doing, and sometimes the results catch me off guard.