﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
3672	Block connection including an array	hackbarde23@…	Adeel Asghar	"Hello guys,

I have two Blocks, A and B and I want to connect both of them (graphicly) and the data (array) from block A should be transfered to block B.

Here I small example





{{{
block A
  extends Modelica.Blocks.Interfaces.MO;
  parameter Real a[:] = {5.0, 2.0};
  equation
  y = a;
end A;

block B
  extends Modelica.Blocks.Interfaces.MIMO;
  equation
  y = u;
end A;
}}}


So far so fine, but now comes the connection (graphical) in the connection editor. I connect A with B, now I have to enter the indices, for A.y[index] to B.u[index]. I am not able to use the hole vector of A to connect to B, only 1 scalar of A can be connected to B (input and output of must set to 1).

{{{
equation
  connect(A.y[2], B.u[1]) annotation(Line(points = {{-63, 40}, {-10, 40}, {-10, 32}, {-10, 32}}, color = {0, 0, 127}));
}}}

I solved this problem with a for loop to connect the hole array A to B

{{{
for i in 1:2 loop
  connect(mV_Test1.y[i], pS_Test1.u[i]) annotation(Line(points = {{-63, 40}, {-10, 40}, {-10, 32}, {-10, 32}}, color = {0, 0, 127}));
  end for;
}}}

The simulation works fine, the result of Block B is y[1]=5 and y[2]=2 
BUT now I have no more graphical connection line in the connection Editor between A and B :-(

Some one who can help?"	defect	closed	high	never	OMEdit	v1.9.3	invalid	connection array	
