Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

First CCP samples zero after initialization

Hello,

 

I'm trying to read some values of CCP after initialization and what I noticed is that the first samples are zero. After that I receive the values ok but the ones which I'm interested in are already gone (I have to check that imediatly after power on I receive a certain value for the signal).

Is there an woarkaround or is there another way to read as fast as possible after a ecu reset (power on/off) a signal?

 

Please see attached the code which I'm using 

 

Regards,

Vincent

0 Kudos
Message 1 of 3
(6,401 Views)

Hello Vincent,

 

I don't think you need the connect.vi inside your loop.  Once you established the connection with the ECU (outside your loop), you should be able to read the characteristic.  The only other detail I can see is that you are using local variables inside your while loop for the ECUref.  You should just wire the output of your connect (the one outside your loop) to the read (in your loop).  So, 2 modifications:

 

1.  Delete the connect VI from inside the loop

2.  Connect the ECUref directly from the connect outside the loop to the read inside the loop.

 

I modified one of the shipping examples that you can also try.  I hope this helps.

 

read a param.PNG

Message Edited by O_Proulx on 10-09-2009 11:34 AM
O. Proulx
National Instruments
www.ni.com/support
Message 2 of 3
(6,373 Views)

Thanks for reply and for the example!

 

Unfotunatelly this does not solve my problem.

Reading a CCP right after power on gaves me the value 0 instead of let's say 5 (which I'm sure it is because I can read it with another internal tool). Somehow it seems that these first samples are surpressed and changed with 0. After some short time the CCP are read ok but the time for the values which I'm intersted in is elapsed.

 

Any other Idea how to read these "initialization" values?

 

Vincent

0 Kudos
Message 3 of 3
(6,358 Views)