-
Notifications
You must be signed in to change notification settings - Fork 100
Description
I am attempting to use Pycomm3 with a Japanese PLC brand called Toyopuc. I have gotten the reading of data working properly with generic messaging but am having trouble with the sending of data. I keep getting an error in the log stating: Generic message 'generic' failed: Insufficient command data. Would anyone have any idea as to what is happening? Thanks for any help you can provide.
EDS file: `$ EZ-EDS Version 3.21.1.20161208 Generated Electronic Data Sheet
[File]
$ File Description Test
DescText = "PC10G-CPU EDS File";
$ File Creation Date
CreateDate = 05-18-2017;
$ File Creation Time
CreateTime = 16:22:28;
$ Last Modification Date
ModDate = 05-18-2017;
$ Last Modification Time
ModTime = 16:24:37;
$ EDS Revision
Revision = 1.1;
[Device]
$ Vendor ID
VendCode = 130;
$ Vendor Name
VendName = "JTEKT Corporation";
$ Product Type
ProdType = 12;
$ Product Type String
ProdTypeStr = "Communications Adapter";
$ Product Code
ProdCode = 1001;
$ Major Revision
MajRev = 1;
$ Minor Revision
MinRev = 1;
$ Product Name
ProdName = "PC10G-CPU";
[Device Classification]
Class1 = EtherNetIP;
[Params]
Param1 =
0, $ reserved, shall equal 0
,, $ Link Path Size, Link Path
0x0000, $ Descriptor
0xC8, $ Data Type
4, $ Data Size in bytes
"RPI", $ name
"microsecond", $ units
"", $ help string
2000,10000000,50000, $ min, max, default data values
,,,, $ mult, div, base, offset scaling
,,,, $ mult, div, base, offset links
; $ decimal places
Param2 =
0, $ reserved, shall equal 0
,, $ Link Path Size, Link Path
0x0000, $ Descriptor
0xC7, $ Data Type
2, $ Data Size in bytes
"Produced Data Size", $ name
"byte", $ units
"", $ help string
1,1448,2, $ min, max, default data values
,,,, $ mult, div, base, offset scaling
,,,, $ mult, div, base, offset links
; $ decimal places
Param3 =
0, $ reserved, shall equal 0
,, $ Link Path Size, Link Path
0x0000, $ Descriptor
0xC7, $ Data Type
2, $ Data Size in bytes
"Consumed Data Size", $ name
"byte", $ units
"", $ help string
1,1448,2, $ min, max, default data values
,,,, $ mult, div, base, offset scaling
,,,, $ mult, div, base, offset links
; $ decimal places
Param4 =
0, $ reserved, shall equal 0
,, $ Link Path Size, Link Path
0x0000, $ Descriptor
0xC6, $ Data Type
1, $ Data Size in bytes
"Produced Assembly ID", $ name
"", $ units
"", $ help string
100,199,100, $ min, max, default data values
,,,, $ mult, div, base, offset scaling
,,,, $ mult, div, base, offset links
; $ decimal places
Param5 =
0, $ reserved, shall equal 0
,, $ Link Path Size, Link Path
0x0000, $ Descriptor
0xC6, $ Data Type
1, $ Data Size in bytes
"Consumed Assembly ID", $ name
"", $ units
"", $ help string
100,199,101, $ min, max, default data values
,,,, $ mult, div, base, offset scaling
,,,, $ mult, div, base, offset links
; $ decimal places
[Connection Manager]
Object_Name = "Connection Manager Object";
Object_Class_Code = 0x06;
Connection1 =
0x02030002, $ 0-15 = supported transport classes
$ 16 = trigger: cyclic
$ 17 = trigger: change of state
$ 18 = trigger: application
$ 19-23 = trigger: reserved
$ 24 = application type: listen-only
$ 25 = application type: input-only
$ 26 = application type: exclusive-owner
$ 27 = application type: redundant-owner
$ 28-30 = reserved
$ 31 = Direction: Client = 0 / Server = 1
0x44640305, $ 0 = O->T fixed size supported
$ 1 = O->T variable size supported
$ 2 = T->O fixed size supported
$ 3 = T->O variable size supported
$ 4-5 = O->T number of bytes per slot (obsolete)
$ 6-7 = T->O number of bytes per slot (obsolete)
$ 8-10 = O->T Real time transfer format
$ 11 = reserved
$ 12-14 = T->O Real time transfer format
$ 15 = reserved
$ 16 = O->T connection type: NULL
$ 17 = O->T connection type: MULTICAST
$ 18 = O->T connection type: POINT2POINT
$ 19 = O->T connection type: reserved
$ 20 = T->O connection type: NULL
$ 21 = T->O connection type: MULTICAST
$ 22 = T->O connection type: POINT2POINT
$ 23 = T->O connection type: reserved
$ 24 = O->T priority: LOW
$ 25 = O->T priority: HIGH
$ 26 = O->T priority: SCHEDULED
$ 27 = O->T priority: reserved
$ 28 = T->O priority: LOW
$ 29 = T->O priority: HIGH
$ 30 = T->O priority: SCHEDULED
$ 31 = T->O priority: reserved
,0,, $ O->T RPI, size, format
Param1,Param2,, $ T->O RPI, size, format
,, $ proxy config size, format
,, $ target config size, format
"Input Only(ID Type)", $ Connection Name
"", $ help string
"20 04 24 01 2C FE 2C [Param4]"; $ Path
Connection2 =
0x02030002, $ 0-15 = supported transport classes
$ 16 = trigger: cyclic
$ 17 = trigger: change of state
$ 18 = trigger: application
$ 19-23 = trigger: reserved
$ 24 = application type: listen-only
$ 25 = application type: input-only
$ 26 = application type: exclusive-owner
$ 27 = application type: redundant-owner
$ 28-30 = reserved
$ 31 = Direction: Client = 0 / Server = 1
0x44640305, $ 0 = O->T fixed size supported
$ 1 = O->T variable size supported
$ 2 = T->O fixed size supported
$ 3 = T->O variable size supported
$ 4-5 = O->T number of bytes per slot (obsolete)
$ 6-7 = T->O number of bytes per slot (obsolete)
$ 8-10 = O->T Real time transfer format
$ 11 = reserved
$ 12-14 = T->O Real time transfer format
$ 15 = reserved
$ 16 = O->T connection type: NULL
$ 17 = O->T connection type: MULTICAST
$ 18 = O->T connection type: POINT2POINT
$ 19 = O->T connection type: reserved
$ 20 = T->O connection type: NULL
$ 21 = T->O connection type: MULTICAST
$ 22 = T->O connection type: POINT2POINT
$ 23 = T->O connection type: reserved
$ 24 = O->T priority: LOW
$ 25 = O->T priority: HIGH
$ 26 = O->T priority: SCHEDULED
$ 27 = O->T priority: reserved
$ 28 = T->O priority: LOW
$ 29 = T->O priority: HIGH
$ 30 = T->O priority: SCHEDULED
$ 31 = T->O priority: reserved
,0,, $ O->T RPI, size, format
Param1,Param2,, $ T->O RPI, size, format
,, $ proxy config size, format
,, $ target config size, format
"Input Only(Tag Type)", $ Connection Name
"", $ help string
"SYMBOL_ANSI"; $ Path
Connection3 =
0x04030002, $ 0-15 = supported transport classes
$ 16 = trigger: cyclic
$ 17 = trigger: change of state
$ 18 = trigger: application
$ 19-23 = trigger: reserved
$ 24 = application type: listen-only
$ 25 = application type: input-only
$ 26 = application type: exclusive-owner
$ 27 = application type: redundant-owner
$ 28-30 = reserved
$ 31 = Direction: Client = 0 / Server = 1
0x44640405, $ 0 = O->T fixed size supported
$ 1 = O->T variable size supported
$ 2 = T->O fixed size supported
$ 3 = T->O variable size supported
$ 4-5 = O->T number of bytes per slot (obsolete)
$ 6-7 = T->O number of bytes per slot (obsolete)
$ 8-10 = O->T Real time transfer format
$ 11 = reserved
$ 12-14 = T->O Real time transfer format
$ 15 = reserved
$ 16 = O->T connection type: NULL
$ 17 = O->T connection type: MULTICAST
$ 18 = O->T connection type: POINT2POINT
$ 19 = O->T connection type: reserved
$ 20 = T->O connection type: NULL
$ 21 = T->O connection type: MULTICAST
$ 22 = T->O connection type: POINT2POINT
$ 23 = T->O connection type: reserved
$ 24 = O->T priority: LOW
$ 25 = O->T priority: HIGH
$ 26 = O->T priority: SCHEDULED
$ 27 = O->T priority: reserved
$ 28 = T->O priority: LOW
$ 29 = T->O priority: HIGH
$ 30 = T->O priority: SCHEDULED
$ 31 = T->O priority: reserved
Param1,Param3,, $ O->T RPI, size, format
Param1,Param2,, $ T->O RPI, size, format
,, $ proxy config size, format
,, $ target config size, format
"Exclusive-Owner", $ Connection Name
"", $ help string
"20 04 24 01 2C [Param5] 2C [Param4]"; $ Path
[Port]
Object_Name = "Port Object";
Object_Class_Code = 0xF4;
Port1 =
TCP,
"Ethernet Port",
"20 F5 24 01",
2,
0;
[Capacity]
MaxCIPConnections = 128;
MaxConsumersPerMcast = 128;
TSpec1 = TxRx, 1, 1000;
TSpec2 = TxRx, 1448, 1000;
My code:drive_path = '192.168.250.25'
with CIPDriver(drive_path) as drive:
param=drive.generic_message(
service=Services.set_attribute_single,
class_code=ClassCode.assembly,
instance=101,
attribute=b'\x03',
request_data= b'\x0f',
data_type=BYTE,
name='generic',
connected=True,
unconnected_send=True,
route_path=True
)`