Cancel
Showing results for 
Search instead for 
Did you mean: 

Betreff: Error in source while reading data from Tablefile

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello Niks1,

 

the source object itself has an internal pointer for processing the tablefile you define. so as SIMULATOR already said, you cut off the branch where you are sitting on.

In your case, you have to create your own "source object" using for example a station. 

use a method which is called by the init method for starting the creation of MUs.

This method could look like:

var part : object
repeat
	for var j := 1 to TableFile["Quantity", 1] loop
		waituntil station.empty
		part := TableFile["Object", 1].create(station)
		part.name := TableFile["Type", 1]
	next
	tablefile.cutRow(1)
until tableFile.YDim=0

// all rows are finished
// now you can copy new rows from other tables
// and continue creating the parts

// remember: you have to stop as soon as all tables are empty

With this you should be able to solve your problem.

 

 

 

 

 

Regards
GG

------------------------------------------------------------------------------------------------------
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution

Betreff: Error in source while reading data from Tablefile

Legend
Legend

Hi GG,

 

thanks

This concept is excatly what i want.

Can i apply this concept parallel for all 3 sources.so all source can create part from different table at same time.How can i do this? 

Thanks in advance

Betreff: Error in source while reading data from Tablefile

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello Niks1,

 

For sure, you can assign the method for creating the parts to each "source" object. As soon as a 'source' has processed the complete tablefile, call a central method , let's call them 'dispatch'.

The dispatch method looks for a tablefile with the maximum number of entries and copies some of the entries to the tablefile which is empty. So dispatch should have the calling 'source' as parameter.

Hope this helps.

Regards
GG

------------------------------------------------------------------------------------------------------
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution

Betreff: Error in source while reading data from Tablefile

Legend
Legend

Hi GG,

 

sorry i did not get your point. you suggest that "assign the method for creating the parts to each "source" object". when we assign method(for create part) to the entrance control of source than how can activate that method.Because when we activate this method after source can create part according to tablefile.At the start, NumMu is 0 for source.so how can we activate that method

Thanks

Betreff: Error in source while reading data from Tablefile

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello Niks1,

 

attached you will find a Plant Simulation 14.0 model implementing the described behavior.

Hope this helps.

 

Regards
GG

------------------------------------------------------------------------------------------------------
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution

Betreff: Error in source while reading data from Tablefile

Legend
Legend

Thank you so much..this concept and Methods are working good in my model.

Thanks