Cancel
Showing results for 
Search instead for 
Did you mean: 

Equip SingleProc

Valued Contributor
Valued Contributor

Pic1.PNG

Hey everyone,

 

I have a Problem by trying to equip my SingleProc.

 

I have a production list with the attribute and the color (Pic1) and every time the color changes the SingleProc should equip for 60 seconds but instead of that a warning appears that the attribute is not defined so it can not be equipped.

At the settings I defined it should be equipped by a specific attribute there I insert the attribute name (color).

 

I really don't know where my mistake is...

Could someone help me?

 

Thank you.

Best regards,

IceTea

18 REPLIES

Re: Equip SingleProc

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
is this the delivery table of the source?
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Equip SingleProc

Valued Contributor
Valued Contributor

This is the first part of the production sequence which I generate at the Source.

Re: Equip SingleProc

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
the structure of the table is wrong, the column 4 needs to have the format table (the best way is to make a new table, assign it to the source and the source will format it);
type something in the column 4 and press F2 (or doubleclick in the cell), type the name of the attribute in the column1 of the subtable and the value in the column with the header "string"
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Equip SingleProc

Valued Contributor
Valued Contributor

Okay its working now but just for the first 5 rows. (Because I just changed it for them)

Do I have to repeat this for every row/cell??

Because sometimes I have more than 200 parts...

Re: Equip SingleProc

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
you can copy/paste it
or you can use SimTalk
see help --> createNestedList
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Equip SingleProc

Valued Contributor
Valued Contributor

Hey,

I decided to program it the other way is too much work...

I really tried my best but its a mistake inside the code which I cannot detect...

 

Could you help me?

That's the code:

 

is
var Subtable : list;                   //name of my Subtable
do
Main.erzeugeSublist(1,1);     //creating a sublist at the mainlist
Subtable := Main[5,3];          //defining the size of my subtable
Subtable [1,2] := "Color";      //Fil in the cells
Subtable [4,2] := "01:02";
end;

 

 

Best regards,

IceTea

 

Re: Equip SingleProc

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

let the source format the table !! the attributes need to be in column 4 !!

 

Main.erzeugeSubliste(4,1); //creating a sublist at the mainlist
Main[4,1] [1,1] := "Color"; //name of the Attribute
Main[4,1] [4,1] := "red";//value in column "string"

 

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Equip SingleProc

Valued Contributor
Valued Contributor

The Source already formed my table and this code is doing nothing...

 

If I understood right the code should create a sublist for every position in the mainlist and fil in the needed values, right?

If this is the case I don't know how this programming should work or how it should effect because my list looks extly the same as before...

 

I will go on trying but if you have any more hints I would be very thankful.

 

Best regards,

IceTea

Re: Equip SingleProc

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

the code is only creating a sublist in the first row, you will need a loop, if you want to create a sublist in each row, e.g. like this:

 

for var i:=1 to main.yDim loop
  Main.erzeugeSubliste(4,i); //creating a sublist at the mainlist
  Main[4,i] [1,1] := "Color"; //name of the Attribute
  Main[4,i] [4,1] := "red";//value in column "string"
next
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net