Author Topic: CAN latch  (Read 7998 times)

Offline topal

  • PLUS+1 Developer
  • ***
  • Posts: 21
  • Karma: +0/-0
CAN latch
« on: January 09, 2022, 12:16:55 PM »
Hi everyone

I am trying to get back to the programming of my controller after a forced stop on my part

I resume slowly and I find myself confronted with a problem of data transmission on the CAN network

to put it simply, I would like to change byte 7 of my CAN frame when C1p06 is high

my program works but has one condition, it is that C1p06 is connected or not to the powering of the controller to see the change in the frame

it is as if my can frame only changed when powering up and after nothing that C1p06 is connected or not, the CAN frame always keeps the same message

I have attached the screens of my program as well as the CAN frames so that you can clearly see

I don't understand why it's latch effect

as you can see, for the control, I integrated a switch to vary the intensity of my bulb connected to C1p37 and it works well

Pat

« Last Edit: January 09, 2022, 12:27:18 PM by topal »

Offline topal

  • PLUS+1 Developer
  • ***
  • Posts: 21
  • Karma: +0/-0
Re: CAN latch
« Reply #1 on: January 09, 2022, 03:43:57 PM »
Hello,

I come back with my problem, and I have advanced, the problem really comes from the CAN TX function, because I put checkpoints on my drawing then with service tool, I read the checkpoints

the information of C1p06 is well converted at the output of the first encoder, then I read the data table at the output of the second encoder is everything is ok

the checkpoin on the output of the oscillator also changes from zero to 1 but slowly I find it to be normal!

looking at the photos you will understand me what I mean

can you help me understand why my CAN data is not refreshing

thank you

Pat

« Last Edit: January 09, 2022, 03:45:48 PM by topal »

Offline FluidPowerTom

  • PLUS+1 Guru
  • *****
  • Posts: 363
  • Karma: +33/-0
Re: CAN latch
« Reply #2 on: January 10, 2022, 05:07:21 PM »
Are you sure the signal to C1p6 is being removed?  I don't see anything else in there that would cause it to latch.  Maybe use the Service Tool to monitor C1p6 and confirm that it is turning off.
Controls Engineer
Hydra-Power Systems

Offline topal

  • PLUS+1 Developer
  • ***
  • Posts: 21
  • Karma: +0/-0
Re: CAN latch
« Reply #3 on: January 10, 2022, 10:18:36 PM »
if you take a good look at the last two photos, the first green square represents C1P06 and as we can see, when I put C1p06 at 12 V C1p06.Digin not well at 1 and bit 7 of my data table which is at the TX entry changes to 127

then when I disconnect the C1p06 input from 12 V C1p06, DigIn goes back to 0 and bit 7 also goes back to 0

except that at this moment the data of the can bus does not change
I am attaching my program so that you can take a look

thank you

Pat

NB : I just found one thing that I cannot correct, on my control it is written 70091045V170.lhx but in GUIDE I only found this reference 70091045V190 (sys: 70091042v190) and it is this reference that I use
« Last Edit: January 10, 2022, 10:31:01 PM by topal »

Offline acmall

  • PLUS+1 Guru
  • *****
  • Posts: 201
  • Karma: +37/-1
Re: CAN latch
« Reply #4 on: January 11, 2022, 09:40:36 AM »
I tested your program and it works as expected with bit 7 in the CAN message changing when the input to C1p06 changes. Are you sure the issue you are seeing is not with the CAN monitor you are using? As FluidPowerTom suggested check with the CAN monitor included in the Service Tool. You can find it the Tools menu.

I did notice that you are using the HWD file ending in _lg.  This is intended for legacy applications, for new applications it is recommended to use the HWD file with the _nl extension. Unfortunately this does not appear to be well documented, the only reference I can currently find is this forum post
https://www.plus1forum.danfoss.com/index.php?topic=948.msg2966#msg2966

Offline topal

  • PLUS+1 Developer
  • ***
  • Posts: 21
  • Karma: +0/-0
Re: CAN latch
« Reply #5 on: January 11, 2022, 10:36:29 PM »
Hello,

thank you for your answers that makes me move forward!

if I use an oscilloscope with a CAN protocol, it is because my CG150-2 has only one port which is connected to the CAN0 of my controller and which is used for programming the shots, I use the CAN1 of the controller for my application and it is on this port that I trace the signal with my oscilloscope

as for the problem with him no, because it is him that I use daily in my work

to operate for program did you modify CAN1 to CAN0?

thank you

Pat

Offline Neil

  • PLUS+1 Expert
  • ****
  • Posts: 96
  • Karma: +2/-0
Re: CAN latch
« Reply #6 on: January 12, 2022, 08:07:48 AM »
^ As per hardware file previously mentioned.
Also noted that your raising transmission edge to TX the data isn't connected to the pending output for uniformed transmission, this is mentioned in the help manual (and + not "pending").
I would tend to connect the input pin Cp106 to drive a simple bool switch with a true and false (just for a bit of logic) then pass the output to the encode, rather than a straight pass through.

Offline acmall

  • PLUS+1 Guru
  • *****
  • Posts: 201
  • Karma: +37/-1
Re: CAN latch
« Reply #7 on: January 12, 2022, 09:12:07 AM »
Quote
to operate for program did you modify CAN1 to CAN0?

I tested it as is on CAN_1. Have you been able to verify that you don't have a fault on the CAN Line?  You can use the Service Tool to check if the controller is showing any CAN faults by adding logs for: -
  • CAN[1].BusOff
  • CAN[1].ErrorPassive
  • CAN[1].Overflow

Offline topal

  • PLUS+1 Developer
  • ***
  • Posts: 21
  • Karma: +0/-0
Re: CAN latch
« Reply #8 on: January 13, 2022, 02:15:25 PM »
Hello,

good i come back with good news

I took everything from the start and I found, you were right, it's my can bus analyzer that is not going well, I replaced it with another and it works well

I'm sorry to have wasted so much time on this when everything is ok

thank you

Pat