<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: CAN message manipulation in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/CAN-message-manipulation/m-p/2991245#M857504</link>
    <description>&lt;P&gt;Hey,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I thought it would be more cohesive in the same thread but next time.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Firstly, thank you for the help with the code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The write to binary file version accumulates a lot of data quickly and the file size gets too big. As you estimated, 62Kbytes/s is only 17MB in a minute but my file sizes reached 300MB in a test lasting more than 5minutes. The code I had uploaded was making a new file every cycle but I was working to make a new file every 1.5GB or so, like writing to multiple files after one file reaches a certain size (Like in the write to measurement file function). This way, I can drive around for sometime and collect the data for offline analysis.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The session from conversion is used for FRAME to Signal conversion, but that block can be removed if I take the session directly from RAW to CAN. I could remove that section all together and make it lighter.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The updated code you sent does not write to table and makes one file that rewrites itself with a limit of 503KB. This is due to the buffer size of 4900frames.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am working on a big project, radar sensing around the car for environement perception. I am new to labview and learning to use the software (Completing Core1 and Core2 with video tutorials). I'm thinking bigger scale now with respect to the whole project that recieves information from 5 radars, 10 ultrasonics, processed Camera data into the PXI system. My goal is to make a code for reading data from 5 radars, log and create an interactive front panel with radar target graphs, information, and more complex, chaning attributes of target on the plots. For example, make moving targets apprear in a fading trajectory, colour coding for size/ movement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Logging to table, most importantly, saving it efficiently, then plotting the data are my primary requirements. I would focus on scaling and project progres work for the later issues.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 12 Sep 2014 13:36:25 GMT</pubDate>
    <dc:creator>Red43</dc:creator>
    <dc:date>2014-09-12T13:36:25Z</dc:date>
    <item>
      <title>CAN message manipulation</title>
      <link>https://ni.lithium.com/t5/LabVIEW/CAN-message-manipulation/m-p/2865802#M834397</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm new to LabView and i'm finding it extremely challenging, mainly due to data types.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Firstly I need my project to save all CAN messages.&lt;/P&gt;
&lt;P&gt;Secondly I need to inspect the ArbitationID and act on it accordingly (some resulting in a CAN write)&lt;/P&gt;
&lt;P&gt;Then I need to file the data accordingly and show some data on the GUI&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="line-height: 1.2;"&gt;Usign the single read I can convert the CAN message inc timestamp to a string and save it but if i try and convert it to a cluster for manipulatuion all I get is the 8 bytes of data&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="line-height: 1.2;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="line-height: 1.2;"&gt;If I use the multi CAN read I can't break the 5 elements within a cluster within an array down to save the message&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="line-height: 1.2;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="line-height: 1.2;"&gt;Any thoughts?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 May 2014 15:44:28 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/CAN-message-manipulation/m-p/2865802#M834397</guid>
      <dc:creator>Unkle77</dc:creator>
      <dc:date>2014-05-28T15:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: CAN message manipulation</title>
      <link>https://ni.lithium.com/t5/LabVIEW/CAN-message-manipulation/m-p/2866006#M834426</link>
      <description>&lt;P&gt;It sounds like you don't have much experience with LabVIEW at all. &amp;nbsp;Here are some free training if you are interested:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3 Hour Introduction&amp;nbsp;&lt;A href="http://www.ni.com/white-paper/5243/en/" rel="nofollow" target="_blank"&gt;http://www.ni.com/white-paper/5243/en/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;6 Hour Introduction&amp;nbsp;&lt;A href="http://www.ni.com/white-paper/5241/en/" rel="nofollow" target="_blank"&gt;http://www.ni.com/white-paper/5241/en/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;LabVEW Basics&amp;nbsp;&lt;A href="http://www.ni.com/gettingstarted/labviewbasics/" rel="nofollow" target="_blank"&gt;http://www.ni.com/gettingstarted/labviewbasics/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Self Paced training for students&amp;nbsp;&lt;A href="http://www.ni.com/academic/students/learn/" rel="nofollow" target="_blank"&gt;http://www.ni.com/academic/students/learn/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Self Paced training beginner to advanced, SSP Required&amp;nbsp;&lt;A href="http://sine.ni.com/myni/self-paced-training/app/main.xhtml" rel="nofollow" target="_blank"&gt;http://sine.ni.com/myni/self-paced-training/app/main.xhtml&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;LabVIEW Wiki on Training&amp;nbsp;&lt;A href="http://labviewwiki.org/LabVIEW_tutorial#External_Links" rel="nofollow" target="_blank"&gt;http://labviewwiki.org/LabVIEW_tutorial#External_Links&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Beyond that I'd recommend looking at the Example Finder found under the Help menu. &amp;nbsp;You didn't say your hardware but I assume it is XNET. &amp;nbsp;There are several examples with different ways to perform the read, and they will return different data types. &amp;nbsp;Opening the context help can show the structure of the data and help you understand how to get what you need.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you need more help try to post a VI of what you have tried.&lt;/P&gt;</description>
      <pubDate>Wed, 28 May 2014 18:13:29 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/CAN-message-manipulation/m-p/2866006#M834426</guid>
      <dc:creator>Hooovahh</dc:creator>
      <dc:date>2014-05-28T18:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: CAN message manipulation</title>
      <link>https://ni.lithium.com/t5/LabVIEW/CAN-message-manipulation/m-p/2866432#M834493</link>
      <description>Hi, I'm using the NI USB-8473 interface.  I've been through a fair few of the examples and videos NI offer as well as exploring the example finder for the last week.&lt;BR /&gt;&lt;BR /&gt;The examples are of little help as they tend to output to another hardware or GUI with a very specific format. Trying to alter an example seems to get me nowhere either as it leads to trying to shoe horn it leading to type incompatability or loss of data.&lt;BR /&gt;&lt;BR /&gt;I accept this is due to me not understanding the type of logic/work that underpins LabVIEW, at the moment the way problems are approached looks completely foriegn!&lt;BR /&gt;&lt;BR /&gt;I'll post my VI tomorrow.&lt;BR /&gt;&lt;BR /&gt;Thanks for the response.</description>
      <pubDate>Wed, 28 May 2014 23:31:35 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/CAN-message-manipulation/m-p/2866432#M834493</guid>
      <dc:creator>Unkle77</dc:creator>
      <dc:date>2014-05-28T23:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: CAN message manipulation</title>
      <link>https://ni.lithium.com/t5/LabVIEW/CAN-message-manipulation/m-p/2867000#M834592</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Attached is my VI project, its a bit of a mess but all it is doing is looking at the various stages of the CAN output and saving it to 3 different files.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My design has been complicated as I'm usign the multi read which produces an 8 x 2D array which may or may not contain a message depending on how many were recieved in the 10ms refresh window.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I used the top file to see if the messages spread out into the higher arrays and confirmed that they do. &amp;nbsp;Ideally I'd like to stop that from happening but it does nto look like this can be done. &amp;nbsp;So i need to come up with some kind of scalable array reader which reads and acts upon all messages before the 10ms window is up.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First and formost every message has to be acted upon, I can not lose or ignore a single one.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How should I go about this, there does not seem to be a straight forward solution with the CAN VIs provided and I dont want to go down the route of re-inventing the wheel.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 May 2014 14:17:30 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/CAN-message-manipulation/m-p/2867000#M834592</guid>
      <dc:creator>Unkle77</dc:creator>
      <dc:date>2014-05-29T14:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: CAN message manipulation</title>
      <link>https://ni.lithium.com/t5/LabVIEW/CAN-message-manipulation/m-p/2867060#M834609</link>
      <description>&lt;P&gt;I've seen much worst code, but you are making several mistakes that I think make things more difficult.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you perform the read your output is an array of frames. &amp;nbsp;Each Frame is a cluster of 5 things, Timestamp, ArbID, IsRemote, Data Length, and the Data. &amp;nbsp;The Array to Cluster function you are using is not the one you should use. &amp;nbsp;That will take an array and turn it into clusters, but you must define the size and it defaults to 9, so what happens if you get 10 frames in a read? &amp;nbsp;The last one is lost for ever. &amp;nbsp;All reads that read more then 9 frames will lose the ones after the 9th. &amp;nbsp;Additionally what happens if you have no frames? &amp;nbsp;Well it converts it into 9 frames that are blank, but you go and log those anyway.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What you really need to do is process each frame one at a time, looking at the output and then deciding what to do. &amp;nbsp;This can easily be done in a For loop. &amp;nbsp;A For loop will pull out each frame one at a time and allow you do do stuff with it and manipulate it in a way that makes sense, or conditionally log different data to different files. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Attached is an edited version that will process each frame, and depending on the ArbID will write to one of 3 files. &amp;nbsp;If the ArbID is between 0 and 0x12 it goes to one file, from 0x13 through 0x200 it goes to another, and then all other frames go to a 3rd file. &amp;nbsp;I also updated the format into the file to be a little cleaner and I think it will contain the same information in a tab delimeted file. &amp;nbsp;This is of course an example I have no idea what you really need your program to do.&lt;/P&gt;</description>
      <pubDate>Thu, 29 May 2014 14:47:39 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/CAN-message-manipulation/m-p/2867060#M834609</guid>
      <dc:creator>Hooovahh</dc:creator>
      <dc:date>2014-05-29T14:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: CAN message manipulation</title>
      <link>https://ni.lithium.com/t5/LabVIEW/CAN-message-manipulation/m-p/2869180#M835009</link>
      <description>&lt;P&gt;Hi Hoovahh,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thansk so much for the work you did to my project. &amp;nbsp;From the tidy up and clear setup of concept, I could set out and get the bare bones of my project.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I came here to ask another question but I worked it out just now &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The bane of my life, decimal/hex mismatches........ I didnt see that x in the corner of the case box!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks again for taking the time to help!&lt;/P&gt;</description>
      <pubDate>Sat, 31 May 2014 20:44:32 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/CAN-message-manipulation/m-p/2869180#M835009</guid>
      <dc:creator>Unkle77</dc:creator>
      <dc:date>2014-05-31T20:44:32Z</dc:date>
    </item>
    <item>
      <title>Re: CAN message manipulation</title>
      <link>https://ni.lithium.com/t5/LabVIEW/CAN-message-manipulation/m-p/2870002#M835155</link>
      <description>&lt;P&gt;Yup the radix on the case structure can be seen when using the numeric data type by right clicking the case and selecting Radix. &amp;nbsp;You can accomplish something similar using the Coerce In Range to find if a number is in a specific range but for this example it was just easier to use the case structure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT: &amp;nbsp;By the way I noticed no kudos or marking any post as answering the question. &amp;nbsp;Doing this helps the community and helps other users looking for similar help. &amp;nbsp;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jun 2014 12:54:35 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/CAN-message-manipulation/m-p/2870002#M835155</guid>
      <dc:creator>Hooovahh</dc:creator>
      <dc:date>2014-06-02T12:54:35Z</dc:date>
    </item>
    <item>
      <title>Re: CAN message manipulation</title>
      <link>https://ni.lithium.com/t5/LabVIEW/CAN-message-manipulation/m-p/2990935#M857441</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I working on a similar problem acquiring CAN frame data from a radar and processing the information to plot.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am having issues trying to find the best way to log the data. I have tried write to text file, write to binary file and write to spreadsheet file. The issue with write to binary file and spreadsheet file is the file size gets too big (Due to 500kBaud data rate). The write to measurement file VI has an option to write to multiple files after reaching a certain file size but the CAN frame (2D array of string) cannot be input as dynamic data without scrambling the data.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is the best way to save the CAN frames into a log file?&lt;/P&gt;
&lt;P&gt;How to set a filter to identify certain CAN frames?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would be glad if you could help me with this question.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, I am using NI-PXI 8512 board with XNET. I am attaching the code for reference.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Sep 2014 07:44:16 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/CAN-message-manipulation/m-p/2990935#M857441</guid>
      <dc:creator>Red43</dc:creator>
      <dc:date>2014-09-12T07:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: CAN message manipulation</title>
      <link>https://ni.lithium.com/t5/LabVIEW/CAN-message-manipulation/m-p/2991201#M857498</link>
      <description>&lt;P&gt;You really should make a new thread for a new question. &amp;nbsp;But I'll still help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The XNET test panel built into MAX has logging capability. &amp;nbsp;And it logs to a TDMS file. &amp;nbsp;Now for compatability I can see why you might want to just log to a text file ant that works too. &amp;nbsp;I've dealt with a stream of 500Kbaud CAN data logging it all and it isn't really that much data. &amp;nbsp;500Kbaud is only 62KBytes/second. &amp;nbsp;Many high speed DAQ cards can read several hundred thousand samples per second. &amp;nbsp;And a sample is a double which is 64 bits. &amp;nbsp;So logging it isn't the problem, its the technique to log the data that is the problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Opening and closing the log each time is going to be a problem. &amp;nbsp;Just open it once, and close it once. &amp;nbsp;Also no need to make a new log file each time you get data. &amp;nbsp;Why are you making a new file each read? &amp;nbsp;Just append to the one file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why are you reading frames as a stream of bytes, just read them as frames and you don't need the conversion.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also why are you converting frames to signals, open an other session for reading signals. &amp;nbsp;XNet supports opening multiple sessions on the same interface. &amp;nbsp;Look at the CAN Frame and Signal Input Same Port.vi in the Example Finder.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You were also missing the VI that converts frames to string but one is already made for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Attatched is a version with some of these changes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT: &amp;nbsp;Oh and I show how to filter based on Arb ID.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Sep 2014 13:00:03 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/CAN-message-manipulation/m-p/2991201#M857498</guid>
      <dc:creator>Hooovahh</dc:creator>
      <dc:date>2014-09-12T13:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: CAN message manipulation</title>
      <link>https://ni.lithium.com/t5/LabVIEW/CAN-message-manipulation/m-p/2991245#M857504</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I thought it would be more cohesive in the same thread but next time.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Firstly, thank you for the help with the code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The write to binary file version accumulates a lot of data quickly and the file size gets too big. As you estimated, 62Kbytes/s is only 17MB in a minute but my file sizes reached 300MB in a test lasting more than 5minutes. The code I had uploaded was making a new file every cycle but I was working to make a new file every 1.5GB or so, like writing to multiple files after one file reaches a certain size (Like in the write to measurement file function). This way, I can drive around for sometime and collect the data for offline analysis.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The session from conversion is used for FRAME to Signal conversion, but that block can be removed if I take the session directly from RAW to CAN. I could remove that section all together and make it lighter.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The updated code you sent does not write to table and makes one file that rewrites itself with a limit of 503KB. This is due to the buffer size of 4900frames.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am working on a big project, radar sensing around the car for environement perception. I am new to labview and learning to use the software (Completing Core1 and Core2 with video tutorials). I'm thinking bigger scale now with respect to the whole project that recieves information from 5 radars, 10 ultrasonics, processed Camera data into the PXI system. My goal is to make a code for reading data from 5 radars, log and create an interactive front panel with radar target graphs, information, and more complex, chaning attributes of target on the plots. For example, make moving targets apprear in a fading trajectory, colour coding for size/ movement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Logging to table, most importantly, saving it efficiently, then plotting the data are my primary requirements. I would focus on scaling and project progres work for the later issues.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Sep 2014 13:36:25 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/CAN-message-manipulation/m-p/2991245#M857504</guid>
      <dc:creator>Red43</dc:creator>
      <dc:date>2014-09-12T13:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: CAN message manipulation</title>
      <link>https://ni.lithium.com/t5/LabVIEW/CAN-message-manipulation/m-p/2991257#M857506</link>
      <description>&lt;P&gt;Your previous setup was flawed. &amp;nbsp;It would log 4900 frames into a new file, every 10 ms, even if no frames came in. &amp;nbsp;You were writing the entire buffer size to a new file. &amp;nbsp;My version takes the new data that comes in and writes it to a file. &amp;nbsp;I forgot to add the Set File Position to set it to the end after each write so that it would append the new data to the one file. &amp;nbsp;This would then fix that issue. &amp;nbsp;That's why you were were getting way too much data, you were writing the same data over and over into new files.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The attatched file should fix that.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Sep 2014 13:46:00 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/CAN-message-manipulation/m-p/2991257#M857506</guid>
      <dc:creator>Hooovahh</dc:creator>
      <dc:date>2014-09-12T13:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: CAN message manipulation</title>
      <link>https://ni.lithium.com/t5/LabVIEW/CAN-message-manipulation/m-p/2991283#M857508</link>
      <description>&lt;P&gt;The text file still stores only one cycle worth of data.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The buffer did bottleneck the code but it was only used to display the CAN table and targets for a longer time. It was not affecting logging.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The current edit refreshes the target position plot every cycle and this information is too fast to read on the screen. The CAN table also does not display any frames.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have read that the set position file appends the data to the exisitng file but it didn't not work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Gagan&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Sep 2014 13:58:56 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/CAN-message-manipulation/m-p/2991283#M857508</guid>
      <dc:creator>Red43</dc:creator>
      <dc:date>2014-09-12T13:58:56Z</dc:date>
    </item>
    <item>
      <title>Re: CAN message manipulation</title>
      <link>https://ni.lithium.com/t5/LabVIEW/CAN-message-manipulation/m-p/2991293#M857510</link>
      <description>&lt;P&gt;I am attaching the code I had for one binary file that reads 27000 frames and makes a 120MB file.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Sep 2014 14:07:36 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/CAN-message-manipulation/m-p/2991293#M857510</guid>
      <dc:creator>Red43</dc:creator>
      <dc:date>2014-09-12T14:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: CAN message manipulation</title>
      <link>https://ni.lithium.com/t5/LabVIEW/CAN-message-manipulation/m-p/2991719#M857582</link>
      <description>&lt;P&gt;There are multiple errors in that file.&lt;/P&gt;
&lt;P&gt;You are write all files that are in the buffer every time the while loop iterates. What you are getting are duplicates of a lot of CAN frames.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should write &lt;SPAN style="text-decoration: underline;"&gt;only&lt;/SPAN&gt; when you get new frames, and &lt;SPAN style="text-decoration: underline;"&gt;only&lt;/SPAN&gt; the new frames.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why are you reading the CAN raw, and then convert it to CAN frames directly after, when you can read CAN frames directly?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tried to modify your vi a bit, added another method for a buffer using a queue, I think that it is more simple.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was not sure if you wanted to have the newest frames in top or bottom of the table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One thing I'm not sure is working for you is the conversion to signals.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you only what to display the latest received Frame for every unique CAN ID, then I also can show you that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Sep 2014 18:42:10 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/CAN-message-manipulation/m-p/2991719#M857582</guid>
      <dc:creator>dkfire</dc:creator>
      <dc:date>2014-09-12T18:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: CAN message manipulation</title>
      <link>https://ni.lithium.com/t5/LabVIEW/CAN-message-manipulation/m-p/2991753#M857590</link>
      <description>&lt;P&gt;I agree, only new frames must be logged.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That functions was not required to read CAN raw. It was an older version that incorporated that bit.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It does'nt matter which part is first as I can manipulate it for offline data analysis.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;I stream CAN frames live, and I cannot check that part now but I will verify that in the morning.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't need to show latest frames but some frames give information about the device status and I could filter that out to read out the specific information. The previous method to filter using arb ID removes all frames but I could make another separate table that displays the ones I want.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks a ton for all the help.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Gagan&lt;/P&gt;</description>
      <pubDate>Fri, 12 Sep 2014 19:22:22 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/CAN-message-manipulation/m-p/2991753#M857590</guid>
      <dc:creator>Red43</dc:creator>
      <dc:date>2014-09-12T19:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: CAN message manipulation</title>
      <link>https://ni.lithium.com/t5/LabVIEW/CAN-message-manipulation/m-p/2992231#M857708</link>
      <description>&lt;P&gt;Hey,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I just verified the code with live streaming. It is working well now.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The text file size gets big but that's the amount of data storing.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I made a code to filter the CAN frame according based on arb ID as you previously illustrated. I can make a seprate table to check for confirmation messages for configuration changes using CAN output (transmit to port)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I'm not able to to find material on how to construct the CAN frame (ie the payload). Based on the database file, I make the the payload construction. I have read the CAN protocol version 2.0 from bosch and a few papers, but no examples on how to frame CAN messages have been mentioned.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have decoded the CAN frames read and have compared it to the message structure. Using the payload buts in binary, every message can be constructed and according to the given .dbc files.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But the configuration arb ID does not show the changes made. There are two separate .dbc files for the device and I suspect writing through one .dbc file and reading through another might be causing the problem?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to successfully write CAN messages that are one time send and for other setting cyclic transmit (I'm sure of the payload message but not sure about the timestamp)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am attaching the code and .dbc file I am working on. [I send 0x200 for change and receive 0x201 for confirmation. These belong to a different .dbc file (ch0) and the messages 0x513, 1536, 1794 and 1793 are in a different .dbc file. Currently I use write CANframes.vi to send a message and then run my version1.4.vi to check if the change has occured]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Gagan&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Sep 2014 15:12:04 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/CAN-message-manipulation/m-p/2992231#M857708</guid>
      <dc:creator>Red43</dc:creator>
      <dc:date>2014-09-14T15:12:04Z</dc:date>
    </item>
  </channel>
</rss>

