ATTENTION

This FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices.


flexsim.com

Go Back   FlexSim Community Forum > FlexSim Software > Q&A
Downloads

Q&A Using Flexsim and building models

  #1  
Old 08-04-2009
LINWEIXU
Guest
 
Posts: n/a
Downloads:
Uploads:
Default question about TASKTYPE_BREAK

inserttask(ts,TASKTYPE_BREAK,current,NULL); this code should send message to self ,but it does not ,what is wrong.
Attached Files
File Type: zip 123.zip (30.9 KB, 159 views)
  #2  
Old 08-05-2009
LINWEIXU
Guest
 
Posts: n/a
Downloads:
Uploads:
Default

Quote:
Originally Posted by LINWEIXU View Post
inserttask(ts,TASKTYPE_BREAK,current,NULL); this code should send message to self ,but it does not ,what is wrong.
i do not know how use inserttask(obj tasksequence, TASKTYPE_BREAK , obj involved1, obj involved2 )(especial, involved1 and involved2)?
Attached Files
File Type: zip 2.zip (31.9 KB, 159 views)
  #3  
Old 08-05-2009
Tom David's Avatar
Tom David Tom David is offline
Flexsim User
 
Join Date: Aug 2007
Location: Schwaebisch Gmuend, Germany
Posts: 430
Downloads: 157
Uploads: 47
Thanks: 486
Thanked 450 Times in 233 Posts
Rep Power: 520
Tom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant future
Default

I downloaded your model, but was not able to extract it because the Zip file is broken. But I am still able to give you an answer.

I guess you did not read all in the manual about the TASKTYPE_BREAK.
I read it and I think I found your issue.

This is working:

inserttask(ts,TASKTYPE_BREAK,current,NULL,1);

There are a few more parameters for this command and the var1 is important.

__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions."
  #4  
Old 08-05-2009
LINWEIXU
Guest
 
Posts: n/a
Downloads:
Uploads:
Default

thank you very much, I still have a question ,does var1(in here is 1) pass parameter by msgparam(1)??
Attached Files
File Type: zip 3.zip (38.2 KB, 158 views)

Last edited by Tom David; 08-06-2009 at 01:32 AM. Reason: Useless Quote
  #5  
Old 08-05-2009
Tom David's Avatar
Tom David Tom David is offline
Flexsim User
 
Join Date: Aug 2007
Location: Schwaebisch Gmuend, Germany
Posts: 430
Downloads: 157
Uploads: 47
Thanks: 486
Thanked 450 Times in 233 Posts
Rep Power: 520
Tom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant future
Default

Did you read the manual?
Task Types: TASKTYPE_BREAK

var1
This parameter specifies whether or not the content of the TaskExecuter should be screened before performing the break task. By default (0), the TaskExecuter will only perform a break task if its current content is less than the maximum content specified in its Properties page. If var1 is not 0, however, then the TaskExecuter will ignore its current content, and perform the break task anyway. This parameter is also passed in as parval(3) if it is to call its Break To Requirement function, and as msgparam(1) if it is to send a message.


Yes, the var1 is then pass over as msgparam(1).
In your model is the problem that you forgot to define involed2 which is NULL. This code will give you msgparam(1) with value 2.

inserttask(ts,TASKTYPE_BREAK,current,NULL,2);

One note beside: Please stop to Quote the whole previous post in your reply. It is okay, sometimes to quote parts of a previous post, but what the point to quote the whole post if everybody can see it?
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions."
  #6  
Old 08-05-2009
LINWEIXU
Guest
 
Posts: n/a
Downloads:
Uploads:
Default

Thank you l read the manual,but sometimes i can not understand it. It does not have corresponding examples .because it After all, i am only a green hand.Just I didn't care, sorry.Thanks again for your help,I'm really very grateful to you

i also do not know how use inserttask(obj tasksequence, TASKTYPE_BREAK , NULL, obj involved2 )(especial, involved2)? can you give me a simple example?
where get reference about involved2,in the same trigger or other?

Last edited by Tom David; 08-06-2009 at 01:33 AM. Reason: Useless Quote


Thread Thread Starter Forum Replies Last Post
TASKTYPE_BREAK qin tian Q&A 2 10-25-2008 11:46 PM


All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.