![Advantech PCL-841 Series Скачать руководство пользователя страница 18](http://html.mh-extra.com/html/advantech/pcl-841-series/pcl-841-series_user-manual_2856744018.webp)
Chapter 3 Software Programming
17
Response
l=successful
0=fail
Example
#include "can84 1.h"
main()
{
if (canNormalRun(0)==0)
printf ("CAN Port I can’t change to Normal Mode!\n");
}
Function 6
Tells the CAN port to send a message.
Command
canSendMsg (BYTE port, MSG_STRUCT send msg);
Argument
BYTE port, MSG_STRUCT send_msg;
port= port number (O or 1)
send msg= send buffer pointer
Response
l=successful
0=fail
Example
#include “can84 1.h” main()
{
MSG_STRUCT smsg 1;
Ul i;
smsg 1.id=0x015;
smsg l.rtr=0;
smsg l.dlen=8;
for(i=0; i<smsg l.dlen; i++)
smsg l.data[i]=i;
if (canSendMsg(0,smsg 1)==l)
printf ("TRANSMISSION SUCCESSFUL!\n");
{
Содержание PCL-841 Series
Страница 2: ...1 Introduction C H A P T E R ...
Страница 5: ...4 PCL 841 Series User s Manual ...
Страница 6: ...2 Hardware Installation C H A P T E R ...
Страница 8: ...Chapter 2 Hardware Installation 7 Jumper and switch locations ...
Страница 13: ...12 PCL 841 Series User s Manual ...
Страница 14: ...3 Software Programming C H A P T E R ...
Страница 22: ...4 DataMonitor Utility C H A P T E R ...
Страница 28: ...5 Wiring C H A P T E R ...
Страница 31: ...30 PCL 841 Series User s Manual ...
Страница 32: ...A Register structure A P P E N D I X ...
Страница 37: ...36 PCL 841 Series User s Manual ...