question

Flavia P2 avatar image
0 Likes"
Flavia P2 asked Joerg Vogel commented

Unable Read/Write Modbus Registers from Node-Red

Hello everyone,

I have been able to read registers of the simulation environment using modbus in nod-red

Now I was trying to write to the registers but it has been impossible. I used in the same modbus in node red sending the a value 1 to flexsim register 7 and the conveyor belt but it didn't move.

I have seen in other publication with this example working, I don't kown if youi have any suggestions for me?


FlexSim 19.0.9
flexsim 19.0.9emulation modulenode-red
1602605254225.png (329.5 KiB)
1602605291815.png (418.8 KiB)
1602605434456.png (278.5 KiB)
1602605517288.png (397.8 KiB)
· 7
5 |100000

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

Ben Wilson avatar image Ben Wilson ♦♦ commented ·

@Matt Long, @Joshua S, can you please respond to this emulation question?

0 Likes 0 ·
Isabella AC avatar image Isabella AC commented ·

@Flavia P2 Could you share how did you control de conveyor belts using Node-red, please?

0 Likes 0 ·
Ryan Clark avatar image Ryan Clark Isabella AC commented ·

Hi @Isabella AC,

If you haven't solved this problem already, could you please post this as a new question? You can link to this post in your new question if that would be helpful for others trying to answer your question. Thanks!

0 Likes 0 ·
立洲 avatar image 立洲 commented ·

@弗拉維亞P2 I want to know how you use node red, because I am currently using this method

0 Likes 0 ·
Ryan Clark avatar image Ryan Clark 立洲 commented ·

Hi @立洲,

Could you please post this as a new question? You can link to this post in your new question if that would be helpful for others trying to answer your question. Thanks!

0 Likes 0 ·
立洲 avatar image 立洲 commented ·

@約書亞S 我想知道你對node red和Flexsim之間的聯繫的想法和秘訣

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel 立洲 commented ·

@立洲 , please create a new thread by using action field at this answer site thread ask a question from above. This site has got a different policy than bulletin board forums: You ask a question and therefore you create a new thread, you get answers, you can accept an answer to your question, than this thread is finished. You can write comments to clarify answers or questions.

There is an article which describes how to use this type of forum: Best Practices for using this Answers site

2 Likes 2 ·

1 Answer

·
Joshua S avatar image
2 Likes"
Joshua S answered Flavia P2 commented

@Flavia P2

First make sure you have the connection you want to use selected in the picture below. You have it correctly selected for your Sensors.

If that doesn't work I'd like to see if it's reading anything in general. Add a code snipet to the Action Field and enter this print(newValue,oldValue);


Then open up the Output console and see if anything is being written when you run it. Do this for all the registers you want to listen to.


1602610026285.png (404.9 KiB)
1602609883640.png (9.0 KiB)
1602609909052.png (12.7 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.

Flavia P2 avatar image Flavia P2 commented ·

Thank you I will try this and let you known


0 Likes 0 ·
Flavia P2 avatar image Flavia P2 commented ·

So after I tried your solution with Code Snippet this was the result on the Output Console

I'm new to FlexSim, so I don't know how to intrepert these results, if could help me again please it would be great

0 Likes 0 ·
1602672492007.png (28.5 KiB)
Flavia P2 avatar image Flavia P2 commented ·

for another register the results were totally differente

0 Likes 0 ·
1602673091036.png (18.8 KiB)
Flavia P2 avatar image Flavia P2 commented ·

Just to let you know that I was already able to control de conveyor belts using the Node-red application

0 Likes 0 ·
1602685810149.png (160.8 KiB)

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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