MacsimJX is an interface that enables communication between Simulink and a Multi Agent System (MAS) created by Jade. The need to develop MacsimJX is to ensure stability to liaise S-functions of Simulink by a multi-threaded program like the example of MAS, where each agent represents a thread. MAS is widely used in several fields, but its sampled feature makes the control of dynamics systems with continuous states quite complex. This is due to the discontinuous nature of the control algorithm. This paper proposes an effective way to control decentralized systems by MAS reacting in an environment that depends on continuous functions. To illustrate the potential of the hypothesis, a case study is presented. The results analyzed in this paper have shown a new architecture where the decision making is carried out only by the agents, and data needed to act in the environment where agents react are calculated by Simulink thanks to MacsimJX.