lovu Posted October 23, 2020 Share Posted October 23, 2020 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 Link to comment Share on other sites More sharing options...
Omron Forums Support Posted October 23, 2020 Share Posted October 23, 2020 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 More sharing options...
lovu Posted October 25, 2020 Author Share Posted October 25, 2020 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 More sharing options...
Omron Forums Support Posted November 3, 2020 Share Posted November 3, 2020 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. Link to comment Share on other sites More sharing options...
lovu Posted November 5, 2020 Author Share Posted November 5, 2020 Thank you Eric. Link to comment Share on other sites More sharing options...
Recommended Posts