03-29-2017 06:39 AM
Hello
I have come across an some unexpected behavior that I wanted to share and determine if this is common.
I have a script that loads test data into group1 with 4 data channels then creates another group (group2) and loads 4 more channels into this group.
Then the script creates 2 more channels in group1 resulting in the following channel number identification
group1
channel #1 - time
channel #2 - pressure
channel #3 - load
channel #4 - volts
channel #9 - calc
channel #10- calc2
group2
channel #5 - time1
channel #6 - pressure1
channel #7 - load1
channel #8 - volts1
My script then assigns these channel numbers to a particular table in a report template and everything is presented correctly
I then save the data in the portal as a .tdms file and the report .TDV file.
However I have noticed that when I reload the saved tdms and .TDV file things are no longer presented correctly.
The data is loaded as shown below, and my report table is referencing channels #9 &10 to a particular column however in the original data file channels 9 & 10 were located at [1]/[5] & [1]/[6] (as shown above) however when I reloaded the saved data file DIAdem reassigned the channel numbers as shown below
group1
channel #1 - time
channel #2 - pressure
channel #3 - load
channel #4 - volts
channel #5 - calc
channel #6 - calc2
group2
channel #7 - time1
channel #8 - pressure1
channel #9 - load1
channel #10 - volts1
Is this common? If so how can I work around this?
I am using DIAdem 2015 32bit SP2
Solved! Go to Solution.
03-29-2017 07:04 AM - edited 03-29-2017 07:08 AM
Hi,
you can use option to recognize channels by names, not by their numbers. By the way, is it allowed to create some channels in two groups and later add more channel to the first one? Is it overwriting the memory allocated or DIAdem is smart enough to prevent this action? Because I think I had some issues with this in the past...
Best regards,
Piotr
03-29-2017 07:44 AM - edited 03-29-2017 07:48 AM
Your suggestion would work if all channels names are unique in all groups however I may have channel names that are identical in different groups which may cause other problems
03-29-2017 07:46 AM - edited 03-29-2017 07:48 AM
Hi,
see printscreen below, please.
03-29-2017 07:52 AM
What version of DIAdem are you using?
I don't have an options tab in my settings drop down
03-29-2017 07:54 AM
Hi,
I'm using 2012 SP1. Maybe try to find it by yourself, like looking to DIAdem Settings in your drop-down menu, etc.?
It should be very easy to find I think...
03-29-2017 08:14 AM
I found where to make the changes however there is no option to change to channel number in the name oriented references. And even if there was what effect would this have if two or more channels names where the same in multiple groups?
03-29-2017 09:53 AM
Hi Smooth,
I would recommend that you call the ChnRenumber() command after programmatically loading those channels. The saving to file and reloading from file of the channels will always result in a renumbering of the channels. If you call ChnRenumber() before you link to the channels in the REPORT layout by channel number, then the layout will work both before the data is saved and after it is reloaded. You will need to change your current layout once to correspond to the renumbered channels, but then you should be good.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
03-29-2017 10:33 AM
Thanks Brad that did the trick!