Good evening All
Just thought id provide an update on this issue.
Following on from the last message from Liam, i contacted Basic micro in the US, Nathan provided me with an updated βpre-releaseβ Motion Studio with updated firmware also.
This new Motion Studio has a much more indepth CanOpen setup, however i was advised that for what i need the MCP266 to do, MCL Can (Raw Can) would be more than adequite.
Updated Motion Studio for anyone who might need it in the future
https://downloads.basicmicro.com/software/BMStudioTest/BasicmicroMotionStudioSetup.msi
Basic Can Comms File
cnt var long
cancnt var byte
test var byte(8)
temp var byte
canrtr = 0
canlen = 8
main
cancnt = canin ;get next can packet(or 0 if no packets available)
if cancnt then
puts 0,["CANCNT = ", dec cancnt," CANCOBID = ", dec cancobid," CANRTR = ", dec canrtr, " CANLEN = ", dec canlen,13]
puts 0,["CANDATA = ", hex2 candata(7),hex2 candata(6),hex2 candata(5),hex2 candata(4),hex2 candata(3),hex2 candata(2),hex2 candata(1),hex2 candata(0),13]
puts 0,["CANESR = ", hex8 canesr, 13]
endif
cnt = cnt + 1
candata(0) = cnt.byte0
candata(1) = cnt.byte1
candata(2) = cnt.byte2
candata(3) = cnt.byte3
candata(4) = cnt.byte0
candata(5) = cnt.byte1
candata(6) = cnt.byte2
candata(7) = cnt.byte3
cancobid = 0x7F ;send can packet
pause 100
goto main
Note_1; This will output on CobID 0x7F (Dec 127) a counting Value every 100ms.
Note_2;CanESR is an Error Value, as Below.
CANESR bits
31:24 REC(Receive error count)
23:16 TEC(Transmit error count)
15:7 Reserved
6:4 LEC(Last Error, cleared to zero on a valid transmit or receive)
-0: No Error
-1: Stuff Error
-2: Form Error
-3: Ack Error
-4: Bit recessive Error
-5: Bit dominant Error
-6: CRC Error
3 Reserved
2 Bus Off Flag(triggers on TEC > 255 counts)
1 Error passive flag(REC or TEC > 127 counts)
0 Error warning flag(REC or TEC >= 96 counts)
Thank you those who offered Assistance in this issue, especially Liam, it is much appreciated.
~James