Jump to content
OMRON Forums

How to use "Unsolicited Messages" tool to communicate between ppmac and IDE?


lovu

Recommended Posts

Hello there,

 

I want to send strings to IDE and get strings from it. Athough sys.cdata can be used to achieve that, but, I think, the more convenient way is to use "Unsolicited Messages" tool in IDE.

 

I find such built-in Send()/GetSend() functions may help, as shown below. But it seems that GetSend() did not work well because the returned value is always 0, which represents how many characters ppmac has received from software serial port.

 

Anyone can help?

 

 

Hikor

20201023193349.png.4e40ed9533172130e3d01b4cc727afa3.png

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

If you include the send command (but not the getsend command), can you read your message from the unsolicited messages window? It is available under the tools menu.

 

You may want to send a message from somewhere else so that this code can receive it to test the GetSend command. Try the following in the terminal.

cx send0,"Hello, World!"

Link to comment
Share on other sites

If you include the send command (but not the getsend command), can you read your message from the unsolicited messages window? It is available under the tools menu.

 

You may want to send a message from somewhere else so that this code can receive it to test the GetSend command. Try the following in the terminal.

cx send0,"Hello, World!"

 

Hi Eric,

 

Yes, in my code, function Send() works well and the "unsolicited message" tool of the IDE always receives what is Send() from ppmac.

 

It is the function GetSend() taht not work well and I can not receive, in my code, what is sent from IDE/serial port 0, as I press "Send" button in "unsolicited mesage" tool.

 

The "cx send0, "command direction is from ppmac to IDE/serial port 0, which is not what I want.

Link to comment
Share on other sites

  • 2 weeks later...

This issue was resolved over email.

 

An unsolicited messaged can only be received one time. If the unsolicited messages window receives it, then C code will not be able to see it.

 

By default the unsolicited messages window receives messages on buffer0, so if you wish to use if to send messages change it to buffer 1 with the pulldown in the top left of the window (see attachment) and change your GetSend(0,x) command to use buffer 1 GetSend(1,x).

 

It If you right click the window and go to "Properties -> Control -> General" you can enable receiving of various buffers.

changebuffer.png.40bd3dae5c9c7acd537871676d0b5af0.png

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...