J1939 Bottleneck in PV450

Discuss issues and ideas you have to configuring displays with PowerVision
CustomFP
Posts: 41
Joined: Thu Mar 22, 2012 4:12 pm

J1939 Bottleneck in PV450

Post by CustomFP » Tue Aug 05, 2014 5:40 pm

Hi
I'm having an issue with the PV450. I've got an application where I read a remote control and a few sensor signals via j1939, this is then fed into an algorithm which creates a command for a valve driver. This command is then sent back over j1939.

I have been having an issue in the delay between the j1939 signal sent from the remote and the j1939 signal sent back out of the pv450.

To test this I have created a program where the only function is to read a j1939 sensor input the resend it back over can. As you can see from the attached photo, there is a significant delay in between the signals (red = sensor, green = echo'd sensor out of PV450). I have tested that the program "main" is running every 50ms, and both j1939 signals have an average period of approx 50 ms. On powervision the "rate" of both signals has been set to 10ms
When these reading were taken the load on the CAN network was very low.

Does anyone have any tips for increasing the speed at which j1939 is read and transimitter?



void $main$ ()
{
uint c;
smRead(VariableIDs.J1939_DINC_DINC_SL_X,c);
c = 0x3FF&c;
smWrite(VariableIDs.J1939_Transmit_DINC_OUT_RAW,c);
}
Attachments
5-08-2014 4-23-29 PM.png
5-08-2014 4-23-29 PM.png (21.71 KiB) Viewed 118 times
stalley
Enovation Controls Development
Enovation Controls Development
Posts: 618
Joined: Tue Mar 18, 2014 12:57 pm

Re: J1939 Bottleneck in PV450

Post by stalley » Wed Aug 06, 2014 8:27 am

Hi CustomFP,

Interesting problem. I have some questions about your test configuration.

How are you transmitting? Are you using a Transmit device or a Free Form Message with the 10msec timer?

One thing we recommend is to use an activity program, if you are using Powervision Configuration Studio 2.7, or events/actions instead of scripting, if you are using a previous version of PVCS.

I would try, if you aren't already, setting up a Free Form transmit message to your valve driver. Create a calculation event on the transmitted variable(s). Create the 10msec event and timer. Fire the calculation event and the transmit from the 10msec Actions.

Thanks!
Sara Talley
Software Engineer
Enovation Controls
CustomFP
Posts: 41
Joined: Thu Mar 22, 2012 4:12 pm

Re: J1939 Bottleneck in PV450

Post by CustomFP » Thu Aug 07, 2014 9:52 pm

Hi
I am using a Transmit Device. I will create a free for CAN message and give this a go.
Thanks
CustomFP
Posts: 41
Joined: Thu Mar 22, 2012 4:12 pm

Re: J1939 Bottleneck in PV450

Post by CustomFP » Sun Aug 10, 2014 11:17 pm

Fixed the issue.
I needed to use a freeform Can message for both the receive and transmit signals. The j1939 device seems to not update the its variables valve often enough.