{"action":"opened","issue":{"url":"https://api.github.com/repos/OpenEtherCATsociety/SOEM/issues/221","repository_url":"https://api.github.com/repos/OpenEtherCATsociety/SOEM","labels_url":"https://api.github.com/repos/OpenEtherCATsociety/SOEM/issues/221/labels{/name}","comments_url":"https://api.github.com/repos/OpenEtherCATsociety/SOEM/issues/221/comments","events_url":"https://api.github.com/repos/OpenEtherCATsociety/SOEM/issues/221/events","html_url":"https://github.com/OpenEtherCATsociety/SOEM/issues/221","id":374926378,"node_id":"MDU6SXNzdWUzNzQ5MjYzNzg=","number":221,"title":"adddatagram issue","user":{"login":"lo11212001","id":44494476,"node_id":"MDQ6VXNlcjQ0NDk0NDc2","avatar_url":"https://avatars1.githubusercontent.com/u/44494476?v=4","gravatar_id":"","url":"https://api.github.com/users/lo11212001","html_url":"https://github.com/lo11212001","followers_url":"https://api.github.com/users/lo11212001/followers","following_url":"https://api.github.com/users/lo11212001/following{/other_user}","gists_url":"https://api.github.com/users/lo11212001/gists{/gist_id}","starred_url":"https://api.github.com/users/lo11212001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lo11212001/subscriptions","organizations_url":"https://api.github.com/users/lo11212001/orgs","repos_url":"https://api.github.com/users/lo11212001/repos","events_url":"https://api.github.com/users/lo11212001/events{/privacy}","received_events_url":"https://api.github.com/users/lo11212001/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-29T09:31:26Z","updated_at":"2018-10-29T09:31:26Z","closed_at":null,"author_association":"NONE","body":"Hi, everyone:\r\n\r\nI find `ecx_main_send_processdata()` that contain a `datagram(EC_CMD_FRMW, ECT_REG_DCSYSTIME)`.\r\n\r\nI trace code:\r\nAfter setup LRD datagram, it will call `ecx_adddatagram(EC_CMD_FRMW, ECT_REG_DCSYSTIME)`.\r\n\r\n```\r\necx_main_send_processdata(...)\r\n{\r\n\t...\r\n\t/* if inputs available generate LRD */\r\n\tif(context->grouplist[group].Ibytes)\r\n\t{\r\n\t\t...\r\n\t\tecx_setupdatagram(context->port, &(context->port->txbuf[idx]), EC_CMD_LRD, idx, w1, w2, sublength, data);\r\n\t\tif(first)\r\n\t\t{\r\n\t\t\tcontext->DCl = sublength;\r\n\t\t\t/* FPRMW in second datagram */\r\n\t\t\tcontext->DCtO = ecx_adddatagram(context->port, &(context->port->txbuf[idx]), EC_CMD_FRMW, idx, FALSE,\r\n\t\t\t\t\t\t\t\t   context->slavelist[context->grouplist[group].DCnext].configadr,\r\n\t\t\t\t\t\t\t\t   ECT_REG_DCSYSTIME, sizeof(int64), context->DCtime);\r\n\t\t\tfirst = FALSE;\r\n\t\t}\r\n\t\t...\r\n\t}\r\n}\r\n```\r\n\r\nI want to add the other datagram(EC_CMD_FPWR) after the `datagram(EC_CMD_FRMW, ECT_REG_DCSYSTIME)`.\r\n\r\n\r\n```\r\n\tif(first)\r\n\t{\r\n\t\tcontext->DCl = sublength;\r\n\t\t/* FPRMW in second datagram */\r\n\t\tcontext->DCtO = ecx_adddatagram(context->port, &(context->port->txbuf[idx]), EC_CMD_FRMW, idx, FALSE,\r\n\t\t\t\t\t\t\t   context->slavelist[context->grouplist[group].DCnext].configadr,\r\n\t\t\t\t\t\t\t   ECT_REG_DCSYSTIME, sizeof(int64), context->DCtime);\r\n\r\n\t\t\t  /* add */\r\n\t\t\t  ecx_adddatagram(context->port, &(context->port->txbuf[idx]), EC_CMD_FPWR, idx, FALSE,\r\n\t\t\t\t\t\t\t\t\t   context->slavelist[context->grouplist[group].DCnext].configadr,\r\n\t\t\t\t\t\t\t\t\t   MY_REG_ADDRESS, sizeof(Rsize), &my_data);\r\n\t\tfirst = FALSE;\r\n\t}\r\n```\r\n\r\nAfter I add the other datagram(EC_CMD_FPWR), it will make communication abnormal.(wkc <expectedWKC)\r\n\r\nHow to add datagram to read/write register at the cyclic frame in the right way？\r\nThanks.\r\n"}}
{"actor":{"display_login":"lo11212001"}}