Jump to content
OMRON Forums

"send" command in usrcode.c


Recommended Posts

I am trying to output a variable value from inside usrcode.c to the unsolicited messages window in the IDE. When using the "send" command as listed in the Program Command Specification manual, such as: send0,"Hello, World!"; I receive errors on compile, such as "send0 undeclared". Am I using the send command as intended, or is there a better way to evaluate variable values within the custom servo routine? Thanks, Scott
Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

The syntax of many things is different in C code compared to script code. When you install the IDE you also get x2 sample projects. One of these is named "Program Development". Look under the start menu and sub menus where the IDE is. Inside this project you can open the cplc1.c and other c code examples to find help. You can also look in the C API manual and the IDE help which is acessed from the Help Contents of the IDE. The syntax of send in C code from the Program Development example is: if(!(nok = GetResponse((char*)"I130..134",szdata, CHAR_BUF_SIZE, 0))) Send(SEND1_PORT,szdata); else { sprintf(szdata,"CmdProcessor Err# = %d\n", - nok); Send(SEND1_PORT,szdata); }
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...