Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

CAN and PDA DA

Hi Guys,
 
I have a VI that I use to acquire CAN messages and the VI is used in  pocket pc.
As I am becoming more familiar to this forum, I realized that the VI might not be efficient and yesterday after testing I found out the the PDA will give me an error about memory overflow after 95000 lines of data.
 
I am not familiar too much with CAN VI and that is why I used an example and modified to my needs.
 
Do you know if it is possible to change the shift registers with autoindexing so that everytime the file is read is checked and saved right away.
 
I did this for all the other VI that I use for manipulation of the data but I havo no clue about this VI.
 
Thanks
Download All
0 Kudos
Message 1 of 8
(4,960 Views)

Since PDAs have a very limited amount of memory and speed, it's probably better to continuously write the data to the file, rather than building up data in a shift register and writing everything to a file at the end.  Have a look at the "Write to Text File" example VI from Help >> Find Examples...  This example showes how to continuously append data to a log file.

I also noticed that even though you are sriting to a binary file, you are converting data to a string first.  This is the same as writing to a text file.  The PDA environment is mush more limited than a contemporary PC.  Attention to memory efficiency is a must.  If you are going to collect large amounts of data, you might want to explore writing the CAN data directly to a binary file, then parsing that file into string data offline on a PC.  This would definitly increase the amount of data you can collect.

0 Kudos
Message 2 of 8
(4,942 Views)
The only way that I have to save it continuosly is by deleting the shift registers.
I tried that below.
 
Is that what you are referring to?
 
 
 
0 Kudos
Message 3 of 8
(4,934 Views)
I also used the write to text function.
Both VI are very similar and I have eliminated the false conditions from the first one because at this moment I am not sure on how to account for that without shift registers.
Doing so I have continuos strings of data coming and I am saving them instantly.
I am sorry if I am a pain but I have to keep changing my VI because when I build them for the PDA the PDA will not allow certain VI>
 
Michael thanks for you help.
0 Kudos
Message 4 of 8
(4,930 Views)

This is the program flow that I was referring to.  I'm glad to hear that you are able to write your data instantly.

Just one suggestion, the shift register for the error cluster is not necessary.

0 Kudos
Message 5 of 8
(4,915 Views)

Hi,

I am trying to use this VI but for some reasons it will not acquire any data.

Do you know if there is anything else that may influence its performance on a PDA?

The code seems right and I am actually without an idea.

Thanks for your help again,

0 Kudos
Message 6 of 8
(4,905 Views)
Are you saying the last VI you posted (PDA Can Logger faster test v1.1.vi) will not acquire data?  Do you get any errors?   What seems to be the problem?  What all changed from the previously working version?

As far as performance of the VI, I would follow Michael's recommendation and remove the shift register.  I cannot tell how you are converting the data since you didn't post "NetClusterArrayToString 2.vi", so you may want to take a look at how efficiently it is converting the data.  I'd be happy to take a look if you want to post it.

One other recommendation I would have is to switch to PDA mode when you are working with the PDA code.  That way none of the functions that aren't supported on PDA will show up in your palette.
Robert Mortensen
Software Engineer
National Instruments
0 Kudos
Message 7 of 8
(4,895 Views)
Guys,
 
I did work and for some reasons it was not acquiring or building before.
Thanks again.
Now it will save a 30 minutes file in few seconds.
It is time to get to work and develop TCP/IP connectioh in order to read what is going on with a laptop:-)
 
0 Kudos
Message 8 of 8
(4,890 Views)