question

George C2 avatar image
0 Likes"
George C2 asked George C2 commented

Through Code: give a specific processor in the model a process time?

Through FlexSim Custom code, I have created a processor in the 3D model area. Now, I need to assign a specific process time value to that processor. Can anyone help me with the syntax & code to do such a thing?

 treenode newProcessor;
 newProcessor = createinstance(node("fixedresources/Processor", library()),model());

//code to give newProcessor a process time
FlexSim 19.1.0
processorcodeproces time
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Joseph Gillespie avatar image
1 Like"
Joseph Gillespie answered George C2 commented

@George C2

This code will do it:

newProcessor.find(">variables/cycletime").value = "return /**/20/**direct*/;";
buildnodeflexscript(newProcessor.find(">variables/cycletime"));

Just replace 20 with whatever you want the process time to be.

· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

George C2 avatar image George C2 commented ·

Thanks for the help!

0 Likes 0 ·