From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

vector or matrix error after upgrading from DIAdem 8.1 to 2015.

I have a C++ Program that loads data into DIAdem. Back in 8.1 everything was just peachy but now that I've upgraded to 2015 I'm getting errors to the tune of these:

 

ChnName(1): Invalid vector or matrix error
CHNCOMMENT(1): Invalid vector or matrix error
CHNDIM(1): Invalid vector or matrix error
CHNATTRTXT1(1): Invalid vector or matrix error
CHNATTRVAL5(1): Invalid vector or matrix error
CHNATTRINT5(1): Invalid vector or matrix error
CHNLENGTH(1): Invalid vector or matrix error

 

I'm seeing that the channel group is still being created but there are no channels in the group when these errors pop up. My guess is that channels were pre-allocated in the group back in DIAdem 8.1 or something to that effect and that now I'm going to have to create the channel before I can set these properties?

0 Kudos
Message 1 of 7
(2,916 Views)

Hey JDuvall,

 

Thanks for all that information. By any chance is that C++ program that you're using have anything to do with a GPI-DLL? I ask since that is the most relevant use case I can think of, and it I think it would help the discussion with further troubleshooting.

JY
Application Engineer, RF and Communications
National Instruments
0 Kudos
Message 2 of 7
(2,878 Views)

It's a program that lets users import data from a database into diadem. After upgrading I get all of those errors. I'm guessing I'm missing a step in channel creation. 


@yamadj wrote:

Hey JDuvall,

 

Thanks for all that information. By any chance is that C++ program that you're using have anything to do with a GPI-DLL? I ask since that is the most relevant use case I can think of, and it I think it would help the discussion with further troubleshooting.


 

0 Kudos
Message 3 of 7
(2,874 Views)

Hi JDuvall,

 

You listed a series of DIAdem commands in your post.  Are those being called in a DIAdem VBScript, or are they being called by a C++ program communicating with DIAdem using ActiveX?

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

Message 4 of 7
(2,868 Views)

C++ program using activeX. 

0 Kudos
Message 5 of 7
(2,866 Views)

Hi JDuvall,

 

Thanks for the ActiveX answer.  I'm going to guess what you're running into is a change in the "data matrix" from DIAdem 8.1 to dynamic data channels in modern versions of DIAdem.  In DIAdem 8.1 you configured the number of static data channels that DIAdem launches with in a "data matrix" resource file.  You were then stuck with the number of data channels you had configured DIAdem to have, and you were also stuck with the lengths that you had configured each of those channels to be.  If I remember correctly, the default setting was 60 channels and about 5000 values each.  The Desktop (*.ddd) configuration file additionally determined whether any of those available data channels were used at DIAdem startup to load data from a data file, but in any event these 60 static data channels were declared and available immediately after DIAdem launched.  If you are using a modern version of DIAdem with a Desktop (*.ddd) file that chooses not to load any data channels from a data file, then you will have 0 declared channels in the Data Portal.  This would explain why referencing the first data channel via ActiveX does not work.  If this hypothesis is correct, you will need to send an ActiveX command to declare a dynamic data channel before you can reference it through ActiveX.  Here's what that looks like when a Windows VBScript calls DIAdem through ActiveX, the command should be similar in C.

 

Set ToCommand = CreateObject("DIAdem.ToCommand")
Command = "ChnAlloc('NewChanName', 1000, 1)"
ToCommand.CmdExecuteSync(Command)
Set ToCommand = Nothing

Brad Turpin

DIAdem Product Support Engineer

National Instruments

Message 6 of 7
(2,849 Views)

Thanks Brad, I had a feeling it was something like that. I'll give that a try. I've seen several references in the code to things like you described. It's also interesting that it was able to create the channel group, but not the channel but didn't throw errors about the channel and instead throws errors about not being able to set the channel properties. I'll add in a channel creation call after the group is built and see where things go from there. Will post a followup but the diagnosis seems very solid as things stand.

 

Thanks

0 Kudos
Message 7 of 7
(2,844 Views)