LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

rename dynamic signals

If you used a single string (not an array) for each channel and a build array, you could use a single rename function
0 Kudos
Message 11 of 15
(1,110 Views)

Make sure all of your arrays are set to index 0.  Some of them weren't.  If the array is left blank, the channel maintains its original name.  If it has something put in, then it changes it.

 

A cleaner bit of code would be to do the rename signals on all channels at once either before the split or after the merge.  Then you only need one rename subVI.  The array you would feed in would have multiple elements, one for each channel.

 

I don't mess with Express VI's or the dynamic datatype much.  As soon as you need to do something special with your code, they wind up being more trouble than their worth.  There is a lot of unnecessary code going on.

 

I do see a problem going on and I'm not sure why.  I saw using probes that the channel names were getting changed.  But yet the LVM file didn't reflect the new names.  Why?  The "Switch" Express VI between the merge signals and the Write to LVM VI seems to be reverting the signals back to their original name.  I have no idea why.  I have a suspicion there is a coding or logic error in the RelaySwitch.  If you do an Open Front Panel on that Express VI, you can see the underlying code.  The underlying logic error seems to be along the call chain of subRelay.VI >> ex_Modify Signal Names.VI >> ex_Modify Signal Name.VI.  It seems that the "Modify Names" input to the ex_Modify Signal Names.VI inside of subRelay.VI is not connected and that causes the signal names to revert back to the original names as you go down the call chain.

 

I vote BUG!!!  If any other experts are listening in, can you look at this as well and see if you agree?

 

Is there a reason why you are using that "Switch" Express VI there?  If you don't enable logging, why bother "switching" the signals off as they don't go anywhere else.

 

EDIT: To clarify what I think is the bug.  I think the bug is in ex_Modify Signal Name.VI.  Why if the original channel name is found (outer true case) is the NI channel name also modified to be the original channel name & "("& modifier & ")" completely ignoring that the channel name is something else?

Message Edited by Ravens Fan on 02-16-2010 02:21 PM
0 Kudos
Message 12 of 15
(1,108 Views)

Thanks for the tips.  I'll alter the switch VI, and have it once in the code instead of on each channel and see if that helps.  Thanks guys.

 

Incidentally, you mentioned you don't usually mess around with express vi's and dynamic data.  Do you have a suggestion how to get the same channel logger type functionality using something other than the daq assistant?

 

Thanks

Darren

 


Ravens Fan wrote:

Make sure all of your arrays are set to index 0.  Some of them weren't.  If the array is left blank, the channel maintains its original name.  If it has something put in, then it changes it.

 

A cleaner bit of code would be to do the rename signals on all channels at once either before the split or after the merge.  Then you only need one rename subVI.  The array you would feed in would have multiple elements, one for each channel.

 

I don't mess with Express VI's or the dynamic datatype much.  As soon as you need to do something special with your code, they wind up being more trouble than their worth.  There is a lot of unnecessary code going on.

 

I do see a problem going on and I'm not sure why.  I saw using probes that the channel names were getting changed.  But yet the LVM file didn't reflect the new names.  Why?  The "Switch" Express VI between the merge signals and the Write to LVM VI seems to be reverting the signals back to their original name.  I have no idea why.  I have a suspicion there is a coding or logic error in the RelaySwitch.  If you do an Open Front Panel on that Express VI, you can see the underlying code.  The underlying logic error seems to be along the call chain of subRelay.VI >> ex_Modify Signal Names.VI >> ex_Modify Signal Name.VI.  It seems that the "Modify Names" input to the ex_Modify Signal Names.VI inside of subRelay.VI is not connected and that causes the signal names to revert back to the original names as you go down the call chain.

 

I vote BUG!!!  If any other experts are listening in, can you look at this as well and see if you agree?

 

Is there a reason why you are using that "Switch" Express VI there?  If you don't enable logging, why bother "switching" the signals off as they don't go anywhere else.

 

EDIT: To clarify what I think is the bug.  I think the bug is in ex_Modify Signal Name.VI.  Why if the original channel name is found (outer true case) is the NI channel name also modified to be the original channel name & "("& modifier & ")" completely ignoring that the channel name is something else?

Message Edited by Ravens Fan on 02-16-2010 02:21 PM

 

Message Edited by DSRTM on 02-18-2010 02:37 PM
0 Kudos
Message 13 of 15
(1,092 Views)

Hi Guys,

 

I have been working with your code today and it appears that you are correct Raven's Fan.  I will repost on Monday with further information.  DSRTM, there are really good examples built into LabVIEW that will show you how to log multiple channels to file without using Express VIs.  Go to Hardware Input and Output»DAQmx»Analog Measurements»Voltage and take a look at the examples.  Those should give you a pretty good starting point to build your application without express VIs.

Nick Keel
Product Manager - NI VeriStand and Model Interface Toolkit
National Instruments
Message 14 of 15
(1,072 Views)

Hi Guys,

 

I have been able to reproduce the issue reliably, and I reported it to R&D (# 209459) for further investigation. Right now the work around will have to be that you modify the Relay VI and include the new modifier name in it.  You could also manually program the relay functionality without the express VI.  This is more in line with the recommendation to program without express VIs in general.  Thank you both for the feedback! 

Nick Keel
Product Manager - NI VeriStand and Model Interface Toolkit
National Instruments
0 Kudos
Message 15 of 15
(1,054 Views)