question

CSN avatar image
0 Likes"
CSN asked Jeanette F commented

Strange events in the code editor

In the process of writing the code, I encountered some problems.

Problem 1: No error occurs when I swap the positions of "que.subnodes.length>0" and "Table("GT_ParamInput")[4][2]".

There are no errors when I try the following

1, when I add the sixth line of code.

2. When I turned down the refresh rate on the screen.

3. When I use the debug tool for breakpoints.

Attached is my model

example.fsm

FlexSim 23.2.2
global tableeditor
example.fsm (38.5 KiB)
· 4
5 |100000

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

Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·

The model you posted has an error on line 6 of the open sendto port referring to outObject[1] instead of outObjects[1].

The open send to port when the model loads is not the one to which you're referring above it seems, but instead the that of op20 which subsequently has an error/exception. But this exception is not repeatable even in the baseline state before any editor changes, even though the event logs are identical. The same is true in v24.0

It seems you want the queue's to act as FIFO buffers but they're all connected to input 2 on OP20 and 30 - if you connect them on input 1 they will take the queued items first removing the need for this custom sendtoport code.

0 Likes 0 ·
CSN avatar image CSN Jason Lightfoot ♦♦ commented ·

I'm sorry. Maybe I didn't put it right. I will re-attach my model, I want to know why the error is reported and how to solve this errorexample (1).fsm

0 Likes 0 ·
example-1.fsm (39.0 KiB)
Jason Lightfoot avatar image Jason Lightfoot ♦♦ CSN commented ·

Didn't I already offer a workaround? I posted a comment, not an answer since I don't yet know the reason for the exception and why it doesn't happen when debugging.

0 Likes 0 ·
Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @CSN, was Logan Gold's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·

1 Answer

Logan Gold avatar image
0 Likes"
Logan Gold answered

This is definitely a weird issue. There are lots of ways to prevent the exceptions from occurring, and those changes do not seem like they should do anything different logically.

However, we've not been able to identify why the exceptions are occurring in the first place. I've passed it along to the developers to see if there is anything they can find. Since we have workarounds to get rid of the exceptions, it may be a while before the root cause can be found.

5 |100000

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