Hi all!
I'm receiving multiples positions (1 to 10 for exemple) from my PLC and I'd like to know if/how I can push them in an array to ease latter manipulation .
In this exemple i'm receiving the bytes for each component of the position and i would like to manipulate them in a for...loop after
Thanks!
Code
SIGNAL fPLC_pathPlan_x_1 $IN[225] TO $IN[256]
SIGNAL fPLC_pathPlan_y_1 $IN[257] TO $IN[288]
SIGNAL fPLC_pathPlan_z_1 $IN[289] TO $IN[320]
SIGNAL fPLC_pathPlan_a_1 $IN[321] TO $IN[352]
SIGNAL fPLC_pathPlan_b_1 $IN[353] TO $IN[384]
SIGNAL fPLC_pathPlan_c_1 $IN[385] TO $IN[416]
And then i have to manually convert each of them
Code
pos6Motion[Path_Planning_S1].X=fPLC_pathPlan_x_1/10000.0;
pos6Motion[Path_Planning_S1].y=fPLC_pathPlan_y_1/10000.0;
pos6Motion[Path_Planning_S1].Z=fPLC_pathPlan_z_1/10000.0;
pos6Motion[Path_Planning_S1].a=fPLC_pathPlan_a_1/10000.0
pos6Motion[Path_Planning_S1].b=fPLC_pathPlan_b_1/10000.0
pos6Motion[Path_Planning_S1].c=fPLC_pathPlan_c_1/10000.0