Пример #1
0
            internal VAL3PostProcessor(RobotCellStaubli robotCell, Program program)
            {
                _cell    = robotCell;
                _program = program;
                Code     = new List <List <List <string> > >();

                //for (int i = 0; i < cell.MechanicalGroups.Count; i++)
                //{
                //    var groupCode = new List<List<string>>
                //    {
                //        MainModule(i)
                //    };

                //    for (int j = 0; j < program.MultiFileIndices.Count; j++)
                //        groupCode.Add(SubModule(j, i));

                //    Code.Add(groupCode);
                //}
            }
Пример #2
0
            internal VAL3PostProcessor(RobotCellStaubli robotCell, Program program)
            {
                _cell    = robotCell;
                _program = program;

                int groupCount = _cell.MechanicalGroups.Count;

                if (groupCount > 1)
                {
                    _program.Errors.Add("Coordinated robots not supported for Staubli.");
                    return;
                }

                if (!CheckNames())
                {
                    return;
                }

                Code = new List <List <List <string> > >();

                for (int i = 0; i < _cell.MechanicalGroups.Count; i++)
                {
                    var group = _cell.MechanicalGroups[i];
                    //var name = $"{_program.Name}_{group.Name}";
                    var name   = $"{_program.Name}";
                    var mdescs = CreateMdescs(i);

                    var groupCode = new List <List <string> >
                    {
                        Program(name),
                        DataList(i, mdescs, out var indices),
                        Start(name),
                        Stop(name),
                    };

                    for (int j = 0; j < program.MultiFileIndices.Count; j++)
                    {
                        groupCode.Add(SubModule(j, i, mdescs, indices, name));
                    }

                    Code.Add(groupCode);
                }
            }