PLCnext Simulink Target not able to run model in Simulink

Hi
I am using PLCnext target for integration of PLCnext engineer and Simulink. I am able to import PLC library file which i get from Simulink. I am able to run simulink model in PLCnext engineer. The problem i am facing is :-
1) I am not able to run the model in Simulink simultaneously with PLCnext engineer.
2) I have a physical system where I am doing position control of stepper motor , so I am using Symmetrical Encoder module and PWM module. How can I get the Simulink model running and connect it to physical system. When my program is running in PLCnext engineer, in Simulink I don’t see any changes.
image.pngThis is a basic code i wrote to test where inport is connected to frequency port of PWM module in plcnext engineer.
My scope constantly shows 0 value.

I’m not sure that I understand the problem, so I’ll make a few observations, and hopefully some of these will help:
I am able to run simulink model in PLCnext engineer. Just to be clear, the model is:

                                                                    * compiled in Simulink (using the "PLCnext Target for Simulink" software), then
                                                                    * imported into a PLCnext Engineer project, then
                                                                    * sent to a PLCnext Control device, where it is executed, then
                                                                    * monitored in PLCnext Engineer using the optional "Viewer for Simulink" PLCnext Engineer add-in.
I am not able to run the model in Simulink simultaneously with PLCnext engineer.  
When the model is executing in the PLCnext Control device, and being monitored in PLCnext Engineer, there is no relationship with the Simulink software. I'm not sure what behaviour you expect to see.  
How can I get the Simulink model running and connect it to physical system.  
The Simulink model runs in a PLCnext Control device and connects to the physical system using I/O modules like the encoder and PWM modules you mentioned. You should then be able to monitor the behaviour of the model in PLCnext Engineer.  
When my program is running in PLCnext engineer, in Simulink I don't see any changes.  
When the Simulink model is running in the PLCnext Control device, you should be able to monitor the behaviour of the model in PLCnext Engineer (using the "Viewer for Simulink" add-in). You won't see any changes in Simulink, because there is no connection between the Simulink software and the PLCnext Control device that is executing the model. Simulink is only used to create and compile the model, not to monitor the execution of the model in the PLCnext Control device.

Thankyou so much