ATTENTIONThis 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 |
#161
|
||||
|
||||
Normally we save custom shapes within a separated folder in the model folder. Maybe there's a work around with c++ but Flexsim can't save shapes direct in a model.
Carsten |
The Following User Says Thank You to Carsten Seehafer For This Useful Post: | ||
Alistair Smitheman (05-07-2009) |
#162
|
|||
|
|||
Quote:
time: 813.283200 ex: ObjectFunction Exception at: ex: time: 813.283200 ex: ObjectFunction Exception at: ex: time: 986.380200 ex: ObjectFunction Exception at: ex: time: 986.380200 ex: ObjectFunction Exception at: ex: time: 1012.345200 ex: ObjectFunction Exception at: ex: time: 1012.345200 ex: ObjectFunction Exception at: ex: time: 1159.476200 ex: ObjectFunction Exception at: ex: time: 1159.476200 ex: ObjectFunction Exception at: ex: time: 1202.749200 ex: ObjectFunction Exception at: ex: time: 1202.749200 ex: ObjectFunction Exception at: ex: Does anyone know just what tis means? Thanks Alistair |
#163
|
||||
|
||||
If this exception always happens at the same time you should have a look at the event.
For this example: - set Stop Time to 813 to stop simulation before an exception occurs - open tree and go to Main/project/exec/events - look for an event that starts at 813.283200 -> you get a lot of informations about this event Maybe it's a help. Carsten |
The Following 2 Users Say Thank You to Carsten Seehafer For This Useful Post: | ||
Danny Pavan (06-19-2009) |
#164
|
||||
|
||||
On your question about the shapes, the path to the shape is saved although is it usually relative to the program directory. So as long as you have a directory under userprojects with the media files and copy that directory to a different computer it should work.
Concerning the exceptions: "Does anyone know just what tis means?" Yes I do, you screwed up What it means that there is a pointer error in your model somewhere. So you point to an object that does not exist or changed location or something in that field. Fits nicely with the error you reported earlier about the invalide node thing. To get a bit more information switch on the trace debugger: Menu View -> Trace Debugger -> trace on. If you run again you will get more information on where the error appears. But be carefull it shows you where the code leaves the stack, the error could have been initiated somewhere else (1 function calling another one, calling another one, calling another one etc and the error appears in the last function it could have originated in the first one). But anyway you get something more to work on. Then try to solve all the exception before you continue. |
The Following 4 Users Say Thank You to Steven Hamoen For This Useful Post: | ||
Tom David (05-07-2009) |
#165
|
|||
|
|||
High conveyor - Use transport
Hello,
I have presently a conveyor at around 1.2 meter high and I use an operator transporter to carry the output out of the conveyor. My problem is that the operator go up the 1.2 meter top get the box. Is there a way for the operator to not go in the air to get the box ? I have already had this problem but I have resolved it by placing the combiner on the ground and by having his size at 1.2 meter but I cannot do this with the conveyor. Thank you ! Simon R.
__________________
---------------------------------------------------- http://www.clermont-cloutier.com |
#167
|
|||
|
|||
Thank you Phil.
I have taught about it, model wise, it's ok. But in reality, the opperator takes the box from the conveyor. I'll try something like a processor with a time of operation of 0 requiring a transport without a 3D shape. I'll give you some news in 5 minutes.
__________________
---------------------------------------------------- http://www.clermont-cloutier.com |
#168
|
|||
|
|||
Problem resolved !
Have a good day, Simon R.
__________________
---------------------------------------------------- http://www.clermont-cloutier.com |
#169
|
|||
|
|||
OnReset Model Trigger
I'm trying to have the model execute more than one user command in the newly added OnReset Model trigger. It only executes the first one. Does anyone know why this happens?
|
#171
|
|||
|
|||
They work if I put them in separte User Events without a problem. Here is the code from the first event anyway:
/* WARNING - WARNING - WARNING - WARNING - WARNAING This user command will truncate EVERTHING in the fsmacros node that falls under the comment defining the beginning of the #define variables for this procedure. To ensure that no definitions get deleted make sure that the definitions created in this procedure ALWAYS remain at the bottom. */ pt("DAOR_GDefs executed");pr(); treenode fsmacros = node("/1/fsmacros",model()); string findstring = concat("//WARNING! - definitions", " created by DAOR_GDefs below this point ONLY."); int findstringlen = stringlen(findstring); string newstring; string appstring; string currobjname; string strx; /* Loop through tree model objects and create string of definitions */ for(int x=GV_RankFirstModelObj;x<=content(model());x++) { strx = stringcopy(numtostring(x),1,stringsearch(numtostring(x),".")); currobjname = getnodename(rank(model(),x)); appstring = concat(appstring, "#define GD_", currobjname, " ", strx, " \r"); } //get the current fsmacros string string strcurr = getnodestr(fsmacros); pt(concat("The current fsmacros text is ", strcurr)); pr(); //set the point to cut off the string //if it can't be found, then exit int strcutstart = stringsearch(strcurr,findstring)+findstringlen+1; if(strcutstart==-1) { msg("Warning.",concat("The following comment that identifies", " the start of the definitions cannot be found: \r", stringsearch, "\r Please make sure that it is ", "included in the Global Macro Definitions.")); return 0; } //set the cutoff string that will be used to append to string befappstring = stringcopy(strcurr,1,strcutstart); pt(concat("befappstring is: ", befappstring)); pr(); //run the DAOR_GDefs sub routines //string strsub1 = DAOR_GDefsSub_TimerGTRows(); //string strsub2 = DAOR_GDefsSub_MotorSpeedGTRows(); string strsub1 = ""; string strsub2 = ""; string strnew = concat(befappstring,appstring,strsub1,strsub2); pt(concat("the new string is: ", strnew)); pr(); setnodestr(fsmacros, strnew); // refresh the macros refreshglobalvariables(); buildnodeflexscript(model()); |
#172
|
||||
|
||||
I'm not sure but at the end you do "buildnodeflexscript". Might that also rebuild the node you are currently executing? and that way stop the execution? Try putting that line at the end of your OnReset trigger after calling all the usercommands. (I'm not sure that is the problem but it might). You could put a few extra pt's at the end and see if the code runs through completely.
Another remarks, you are creating all these defines for the ranknr's. Are you sure that no ranks are changed during running of the model or on reset? Because that might be a potential bug. If you want easy and fast access I would check out a treenode array or a list of coupling nodes. That way the link to your object stays the same what ever you do. |
The Following User Says Thank You to Steven Hamoen For This Useful Post: | ||
Joe Allen (05-12-2009) |
#173
|
|||
|
|||
Your hunch was correct. Moving the buildnodeflexscript command from the end of the first user command to after the last user command fixed the problem. Thank you for that. As to the defines... I needed the variable name to have the name of the object in it. Would the other 2 methods you suggested have this? I've never heard of a list of coupling nodes so that may have been a better option when I wrote that code awhile back. The ranks will not change during the model run since I'm not dynamically creating or destroying any of the fixed resources. If you know of another reason the ranks could change please let me know. Thanks again for your suggestion.
|
#174
|
||||
|
||||
Why do you need the name?
concerning the other solutions, you could have 2 arrays, one with the name and one with the pointer. For the coupling nodes, I couldn't find information in the helpfile. Take a look at the command nodejoin & createcoupling. Coupling nodes are used quite a lot, for instance for the member list in MTBF/MTTR. Look at the gui and the object to see how it works. |
The Following User Says Thank You to Steven Hamoen For This Useful Post: | ||
Joe Allen (05-14-2009) |
#175
|
|||
|
|||
I didn't see your reply until now. I needed the names on a prior project where I had to simulate main line PLC logic in Flexscript in such a way that a controls engineer could easily understand what is going on. This meant that when a speed change command was sent to a particular object it had to follow the same naming convention that the PLC used for the object name. Thanks for the suggestion on coupling nodes. I'll know that is an option now if I come across the need in the future.
|
#176
|
|||
|
|||
New user question
I'm a new user and I'm working with a situation where I have three processors leading to five queues and each processor works with a specific item type. The item can ship to any of the five processors, but once in the queue, all items must be the same.
I've tried to do this with a push system and the dropdown option of Matching Itemtype. This results in one of three things: 1. This will push each type to separate queues continuously but only use three queues. 2. The itemtypes never cross over, but never release again. This causes blockage in the processors that never clear. 3. The items will backup and then crossover into one queue, negating the matching itemtype option. I know that this results from the "return 0" line at the end of the matching itemtype code. I've also tried a pull system using similar code as the Matching Itemtypes to select the input port. This resulted in all three types pulling into the same queue. The other result was that all but one of the input ports closed, so all five queues pulled from the same processor. I'm not sure what my next option is, but any direction would be appreciated. |
#177
|
||||
|
||||
Attached is a model that essentially sends to "matching itemtypes if available". It checks the availability of the outobjects in addition to just checking the itemtype so that it sends to more than just 3 of the queues. It also returns an invalid port (nrop(current)+1) at the end instead of 0 so that it doesn't mix itemtypes. In order for this to work properly, I had to check the reevaluate sendto port option, and use a delayed message OnExit of the downstream queues that calls openinput() to force a reevaluation because the port we specified was invalid.
Maybe someone else has a better idea, but this seems like a reasonable solution. |
The Following User Says Thank You to Phil BoBo For This Useful Post: | ||
Chad Eshelman (06-19-2009) |
#179
|
|||
|
|||
Arrival Schedule question
I have an arrival schedule set up with my source; but when the arrival time is reached, more than the single item is released. As a result, my arrival schedule is released before my model time is actually finished.
Here is the example I can show easily. Arrival Time PGM Weight ItemType 360.00 X1 Y1 3 1800.00 X2 Y2 1 2489.12 X1 Y3 3 3240.00 X2 Y4 1 4008.67 X1 Y5 3 When the model reaches time 360, it releases the first three events. Is this something I'm setting up incorrectly? Thanks in advance for any help you can provide. |
#180
|
||||
|
||||
Chad,
The Arrival Schedule is setup as follows: Arrival Time | Item Name | Item Type | Quantiy From the looks of the table you have in your post you have scheduled to have 3 items arrive at 360. So, if you mean items when you say events (which has a different meaning in Flexsim) then it would be working correctly. If this is not correct then I would need to know what you mean by events and to have you explain how you have the schedule table set up. Good Luck, Brandon
__________________
thats not normal. |
The Following User Says Thank You to Brandon Peterson For This Useful Post: | ||
Chad Eshelman (06-26-2009) |
Thread | Thread Starter | Forum | Replies | Last Post |
Can coordinated task sequence and "break to requirement" be used together? | qin tian | Q&A | 1 | 05-26-2008 10:44 AM |
error message "Clock overflow, running stopped" | Martin Kooijman | Q&A | 11 | 04-17-2008 10:29 AM |
about "no select" and "show parameter window from side bar" | qin tian | Gripes and Goodies | 3 | 03-21-2008 08:10 AM |
Which variable stores "Properties -> General ->Flags -> Protected" information? | KelvinHo | Q&A | 1 | 03-06-2008 06:18 AM |
"Getting Started" and "Tutorial" models for v4.01 | Cliff King | Product Announcements | 0 | 12-10-2007 07:34 PM |