{"id":3322,"date":"2019-02-12T16:09:02","date_gmt":"2019-02-12T16:09:02","guid":{"rendered":"https:\/\/cyflexdoc.wpengine.com\/usage-help-manual\/17-i-o-systems\/candbc\/"},"modified":"2025-11-04T14:10:32","modified_gmt":"2025-11-04T19:10:32","slug":"candbc","status":"publish","type":"page","link":"https:\/\/cyflex.com\/index.php\/usage-help-manual\/14-i-o-systems\/candbc\/","title":{"rendered":"CanDbc"},"content":{"rendered":"<div>\n<h3>Purpose:<\/h3>\n<\/div>\n<dl>\n<dd>\n<p>Initialize CAN-AC1-PCI\/CAN-AC2-PCI cards or USB devices and capture data from up to 250 channels at a maximum of 50Hz. The program handles reconfiguration, diagnostics requests, and CCP protocol for CAN bus communications, encoding and decoding messages based on DBC file specifications. See <strong>Notes<\/strong> for\u00a0a description of how the .dbc file is composed.<\/p>\n<\/dd>\n<\/dl>\n<h3>Enter:<\/h3>\n<dl>\n<dd>\n<p><strong>CanDbc<\/strong> &lt;filename.dbc&gt; [usbpath1] [baud1=usbbaud1] &lt;filename2.dbc&gt; <br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 [usbpath2] [baud2=usbbaud2] [time=clock_time] <br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 [name=reg_name] [seed=&lt;hexvalue&gt;] [cpu=CPU_bit] [priority] [debug]<\/p>\n<\/dd>\n<\/dl>\n<h3>Where:<\/h3>\n<dl>\n<dd>\n<div>\n<table style=\"width: 92.9013%; height: 663px;\" cellspacing=\"0\" cellpadding=\"0\">\n<colgroup>\n<col \/>\n<col \/> <\/colgroup>\n<tbody>\n<tr style=\"height: 96px;\">\n<td style=\"width: 73.95px; height: 48px;\">\n<p>filename<\/p>\n<\/td>\n<td style=\"width: 648.383px; height: 48px;\">\n<p>Specify the name of the DBC file describing the data monitor. The DBC file describes the communications on a single CAN Network.<\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 56px;\">\n<td style=\"width: 73.95px; height: 56px;\">\n<p>usbpath1<\/p>\n<\/td>\n<td style=\"width: 648.383px; height: 56px;\">\n<p>Optional. Specify a USB device as desired.\u00a0<\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 56px;\">\n<td style=\"width: 73.95px; height: 56px;\">\n<p>baud1<\/p>\n<\/td>\n<td style=\"width: 648.383px; height: 56px;\">\n<p>Optional. Specify a baud rate for a connected USB device.<\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 56px;\">\n<td style=\"width: 73.95px; height: 56px;\">\n<p>filename2<\/p>\n<\/td>\n<td style=\"width: 648.383px; height: 56px;\">\n<p>Optional. Specify the name of a second DBC file to use to send a channel on an AC2 card. If specified, specify a second USB device.<\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 56px;\">\n<td style=\"width: 73.95px; height: 56px;\">\n<p>usbpath2<\/p>\n<\/td>\n<td style=\"width: 648.383px; height: 56px;\">\n<p>Optional. Specify a second USB device.\u00a0<\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 56px;\">\n<td style=\"width: 73.95px; height: 56px;\">\n<p>baud2<\/p>\n<\/td>\n<td style=\"width: 648.383px; height: 56px;\">\n<p>Optional. Specify the baud rate for a second connected USB device.\u00a0<\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 56px;\">\n<td style=\"width: 73.95px; height: 56px;\">\n<p>time<\/p>\n<\/td>\n<td style=\"width: 648.383px; height: 56px;\">\n<p>Optional. Specify the update time. The default is 10.<\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 56px;\">\n<td style=\"width: 73.95px; height: 56px;\">\n<p>name<\/p>\n<\/td>\n<td style=\"width: 648.383px; height: 56px;\">\n<p>Optional. Specify the desired register name. The default name is CanDbc.<\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 56px;\">\n<td style=\"width: 73.95px; height: 56px;\">\n<p>seed<\/p>\n<\/td>\n<td style=\"width: 648.383px; height: 56px;\">\n<p>Optional. Specify a seed hex value for CCP protocol.<\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 56px;\">\n<td style=\"width: 73.95px; height: 56px;\">\n<p>cpu<\/p>\n<\/td>\n<td style=\"width: 648.383px; height: 56px;\">\n<p>Optional. Specify a bit mask value to set on which CPU to function.<\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 56px;\">\n<td style=\"width: 73.95px; height: 56px;\">\n<p>priority<\/p>\n<\/td>\n<td style=\"width: 648.383px; height: 56px;\">\n<p>Optional. Specify the task priority.<\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 55px;\">\n<td style=\"width: 73.95px; height: 55px;\">\n<p>debug<\/p>\n<\/td>\n<td style=\"width: 648.383px; height: 55px;\">\n<p>Optional. Specify this option to display incoming messages to the console<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/dd>\n<\/dl>\n<h3>Example:<\/h3>\n<dl>\n<dd>\n<p><strong>CanDbc<\/strong> \/specs\/cyflex.dbc 12 &amp;<br \/>\nThe above command starts\u00a0the task at priority 12 reading the \/specs\/cyflex.dbc.<\/p>\n<p><strong>CanDbc<\/strong> \/specs\/cyflex.dbc time=10 12 &amp;<br \/>\nThe above changes update time to 10, task at priority 12, reading the \/specs\/cyflex.dbc.<\/p>\n<p><strong>CanDbc<\/strong> \/specs\/cyflex.dbc \/specs\/cyflex2.dbc 12 &amp;<br \/>\nThe above command starts\u00a0the task at priority 12 reading the \/specs\/cyflex.dbc on one bus and reading \/specs\/cyflex2.dbc on a second bus.<\/p>\n<p><strong>CanDbc<\/strong> \/specs\/cyflex.dbc \/dev\/pcanusb0 12 &amp;<br \/>\nThe above uses USB can device \/dev\/pcanusb0 with priority 12<\/p>\n<p><strong>CanDbc<\/strong> \/specs\/cyflex.dbc \/dev\/pcanusb0 baud1=250000 12 &amp;<br \/>\nThe above uses USB can device \/dev\/pcanusb0 with priority 12 at baudrate 250000<\/p>\n<p><strong>CanDbc<\/strong> \/specs\/cyflex.dbc \/dev\/pcanusb0 cyflex2.dbc \/dev\/pcanusb1 12 &amp;<br \/>\nThe above uses USB can device \/dev\/pcanusb0 with priority 12 reading the \/specs\/cyflex.dbc on one bus and reading \/specs\/cyflex2.dbc on a second bus.<\/p>\n<p><strong>CanDbc<\/strong> \/specs\/cyflex.dbc \/dev\/pcanusb0 baud1=250000 <br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/specs\/cyflex2.dbc \/dev\/pcanusb1 baud2=125000 12 &amp;<br \/>\nThe above uses USB can device \/dev\/pcanusb0 with priority 12 reading the \/specs\/cyflex.dbc at baudrate 250000 on one bus and reading \/specs\/cyflex2.dbc on a second bus at baudrate 125000.<\/p>\n<p><strong>Candbc<\/strong> \/specs\/cyflex.dbc 12 seed=0x1234568 &amp;<br \/>\nThe above command starts\u00a0the task at priority 12 reading the \/specs\/cyflex.dbc using a seed key of 12345678.<\/p>\n<p><strong>Candbc<\/strong> \/specs\/cyflex.dbc 12 cpu=8 &amp;<br \/>\nThe above command starts\u00a0the task at priority 12 reading the \/specs\/cyflex.dbc running on CPU 3.<\/p>\n<\/dd>\n<\/dl>\n<h3>Notes:<\/h3>\n<dl>\n<dd>\n<p>Acceptable baud rates for USB are:<br \/>\n1000000 <br \/>\n500000 <br \/>\n250000 <br \/>\n125000 <br \/>\n50000 <br \/>\n20000 <br \/>\n10000 <br \/>\n5000<\/p>\n<p>Acceptable baud rates for cards:<br \/>\n1000000 <br \/>\n800000 <br \/>\n500000 <br \/>\n250000 <br \/>\n125000 <br \/>\n100000 <br \/>\n50000 <br \/>\n20000 <br \/>\n10000<\/p>\n<p>Bit mask for a 4 core CPU:<\/p>\n<\/dd>\n<\/dl>\n<dl>\n<dd>\n<p>0,1 = CPU 0<br \/>\n2,3,6,7,10 = CPU 1<br \/>\n4,5 = CPU 2<br \/>\n8,9 = CPU3<\/p>\n<p>Can restart the bus connection by setting the event candbc_reset<\/p>\n<p>If you are having the problem: error while loading shared libraries: libpcan.so, then you may be missing a library. Check whether you have the library with the command: rpm -qa | grep pcandriver. If nothing shows up then you are missing the library. Install with: sudo yum install pcandriver<\/p>\n<p>Example .dbc file: <br \/>\nNormally the .dbc is generated by another application or already exists. Once the files exists, there are a few parameters that can be changed to determine what message is being sent or read. Here is a sample message from a .dbc, the carrots denote the number format and are not actually in the .dbc file:<\/p>\n<div>\u00a0\u00a0\u00a0&lt;1&gt;\u00a0 &lt;2&gt;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;3&gt;:\u00a0&lt;4&gt;\u00a0&lt;5&gt; \u00a0<br \/>\n\u00a0\u00a0\u00a0BO_\u00a03221225472\u00a0MSG_NAME:\u00a00\u00a0Vector__XXX \u00a0<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0&lt;6&gt; &lt;7&gt; :&lt;8&gt;|&lt;9&gt;@&lt;10&gt;&lt;11&gt; (&lt;12&gt;,&lt;13&gt;) [&lt;14&gt;|&lt;15&gt;]&#8221;&lt;16&gt;&#8221; &lt;17&gt; \u00a0<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0SG_ Var1 : 48|16@1+\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0(1,0) [0|65000] &#8220;%&#8221;\u00a0\u00a0\u00a0\u00a0\u00a0Vector__XXX \u00a0<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0SG_ Var2 : 32|16@1+\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0(1,0) [0|65000] &#8220;none&#8221;\u00a0\u00a0Vector__XXX \u00a0<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0SG_ Var3 : 16|16@1+\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0(1,0) [0|65000] &#8220;none&#8221;\u00a0\u00a0Vector__XXX \u00a0<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0SG_ Var4 :\u00a0\u00a00|16@1+\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0(1,0)\u00a0\u00a0[0|65000] &#8220;none&#8221; Vector__XXX<\/div>\n<ol>\n<li>The BO_ indicates that this is a message<\/li>\n<li>The number after the BO_ is the message ID in base 10. When making changes to the .dbc, most devices and manuals give the ID in hex. You need to manually convert that.<\/li>\n<li>This is the message name<\/li>\n<li>This does nothing in CyFlex.<\/li>\n<li>This is just used as a brief description of the message and does 0nothing in CyFlex.<\/li>\n<li>The SG_ indicates this is a signal for a variable<\/li>\n<li>Is the variable name<\/li>\n<li>the offest of bits at the start of a message. This indicates what bits to use when setting the cyflex variables. (This is normally stated in the device manual)<\/li>\n<li>The size of the signal in bits. This indicates how many bits you use for the cyflex variable. (This is normally stated in the device manual)<\/li>\n<li>This value indicates if the device and message being sent is LITTLE_ENDIAN or BIG_ENDIAN. 1 is LITTLE_ENDIAN, 0 is BIG_ENDIAN<\/li>\n<li>The 10 is the &#8216;+&#8217; sin above. &#8211; is for signed value, + is for unsigned.<\/li>\n<li>This value is the factor used when calculating the value. It takes the raw value and multiples by the factor.<\/li>\n<li>This value is the offset that is added after the factor has been multiplied.<br \/>\nphysical_value = raw_value * factor + offset<\/li>\n<li>Minimum value. The physical_value cannot be lower than this<\/li>\n<li>Maximum value. The physical_value cannot be higher than this<\/li>\n<li>This is the units to use in CyFlex<\/li>\n<li>Just a description, not useful<\/li>\n<\/ol>\n<\/dd>\n<\/dl>\n<h3>See Also:<\/h3>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <a href=\"https:\/\/cyflex.com\/index.php\/usage-help-manual\/14-i-o-systems\/candbc_list\/\">candbc_list<\/a>, <a href=\"https:\/\/cyflex.com\/index.php\/usage-help-manual\/14-i-o-systems\/candbc_set\/\">candbc_set<\/a>, <a href=\"https:\/\/cyflex.com\/index.php\/usage-help-manual\/14-i-o-systems\/candbc_clear\/\">candbc_clear<\/a>, <a href=\"https:\/\/cyflex.com\/wp-content\/uploads\/CAN-bus-Device-Drivers-Setup.pdf\">CAN Bus Interface Setup and Use<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Purpose: Initialize CAN-AC1-PCI\/CAN-AC2-PCI cards or USB devices and capture data from up to 250 channels at a maximum of 50Hz. The program handles reconfiguration, diagnostics requests, and CCP protocol for CAN bus communications, encoding and decoding messages based on DBC file specifications. See Notes for\u00a0a description of how the .dbc file is composed. Enter: CanDbc [&hellip;]<\/p>\n","protected":false},"author":47,"featured_media":0,"parent":1964,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-3322","page","type-page","status-publish","hentry"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages\/3322","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/users\/47"}],"replies":[{"embeddable":true,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/comments?post=3322"}],"version-history":[{"count":0,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages\/3322\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages\/1964"}],"wp:attachment":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/media?parent=3322"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}