Problem with controlling conveyor motor in Emulation Properties

Problem with controlling conveyor motor in Emulation Properties

sakamoto_ryosuke
Collaborator Collaborator
131 Views
7 Replies
Message 1 of 8

Problem with controlling conveyor motor in Emulation Properties

sakamoto_ryosuke
Collaborator
Collaborator

[ FlexSim 23.0.8 ]

Hello, I've been testing Emulation in 23.0.8. While controlling conveyor motor from Emulation properties, I've encounted problem.

When you send signal from OPC Server to FlexSim to stop the motor, it stop simultaneously. However, when I send signal to resume, it takes about 12 sec until the motor actually resume.

The signal itself seems to be recieved without problem, because in ProcessFlow, I can see that the signal is received without delay. Please take a look at the video file.

Conveyor_OPC_control.mp4

EmulationTest_2023.fsm

1688027570564.png

0 Likes
Accepted solutions (1)
132 Views
7 Replies
Replies (7)
Message 2 of 8

Jeanette_Fullmer
Community Manager
Community Manager

@Luciano Cavallero, @Tancredi Canonico, @Fiorenzo A, can you please take a look at this emulation-related question?

0 Likes
Message 3 of 8

JordanLJohnson
Autodesk
Autodesk
Accepted solution

After looking at this model, here is my guess. I'm unable to test to confirm, but maybe this is the issue.

Your emulation tool is polling every 50 ms to get the variable values. If the Control variable is 0, then the model is configured to stop the conveyor. So the model is stopping the conveyor every 50 ms.

In FlexSim, you have to resume an object as many times as you stop it.

So it is true that when the sensor is 1, the model resumes the conveyor. However, each call to resume cancels out only one call to stop.

In your video, you have set the value 0 for about 25 seconds. So that means the model has called stop about 12* (1000 / 50) = 240 times. Since resume is called every 50 ms, that means it takes about 12 seconds to cancel out all the stops.

.


Jordan Johnson
Principal Software Engineer
>

Message 4 of 8

julie_weller
Not applicable

Hi @Ryosuke S, was Jordan Johnson'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
Message 5 of 8

sakamoto_ryosuke
Collaborator
Collaborator
@Jordan Johnson Thank you for your reply. I understood the cause. And you are right the polling is set every 50ms. But how can I prevent it? Depending on how the it is programmed on PLC side, the signal maybe True while the conveyor is stopped or conveyor is runnning. I don't suppose you need to change the polling interval accordingly.
0 Likes
Message 6 of 8

joerg_vogel_HsH
Mentor
Mentor
@Ryosuke S, you work indirectly with the signal. You set a storable value at your model and a process flow tests against this value change.
0 Likes
Message 7 of 8

lcavallero
Enthusiast
Enthusiast

@Ryosuke S you can also set a simply filter in your picklist to trigger only when value changes:
1690439306663.png

Message 8 of 8

sakamoto_ryosuke
Collaborator
Collaborator
@Luciano Cavallero Thank you. Solved!
0 Likes