CAN port id in Angelscript?

Discuss issues and ideas you have to configuring displays with PowerVision
JoakimMD
Posts: 20
Joined: Fri Oct 22, 2010 9:17 am

CAN port id in Angelscript?

Post by JoakimMD » Fri Mar 04, 2016 7:37 am

Hi all,

PV780 and PowerVision 2.7.10475

Is using script to send CAN msg. Works fine on CAN port 1 but how do I send on CAN port 2?
For CAN port 1 I set "int port = 0;" so I assumed that "port = 1" would be CAN port 2 but I can´t get any msg to tx on that port.

What am I doing wrong? :)

Thanks!

/Joakim
stalley
Enovation Controls Development
Enovation Controls Development
Posts: 618
Joined: Tue Mar 18, 2014 12:57 pm

Re: CAN port id in Angelscript?

Post by stalley » Fri Mar 04, 2016 7:55 am

Hello JoakimMD,

On the Connections tab, with the CANPort2 selected, is the Enabled checkbox checked? It isn't by default.

In your script with the display powered up and connected, if you click on Compile All Scripts in the lower left, is it successful?

Does the message transmit successfully on CANPort1?
Sara Talley
Software Engineer
Enovation Controls
JoakimMD
Posts: 20
Joined: Fri Oct 22, 2010 9:17 am

Re: CAN port id in Angelscript?

Post by JoakimMD » Fri Mar 04, 2016 8:04 am

Hi,

Thanks!

The CAN port 2 wasn´t enabled! Everything works now.

Can´t use Compile function. I am transferring with flash drive. I have ordered a programming kit but it was back ordered at my supplier in Sweden. Please handle their order quickly. I need my Cable! :)

Thanks, Joakim
stalley
Enovation Controls Development
Enovation Controls Development
Posts: 618
Joined: Tue Mar 18, 2014 12:57 pm

Re: CAN port id in Angelscript?

Post by stalley » Fri Mar 04, 2016 9:05 am

:-)

Many times I have thought something was broken on a CAN port, but I had failed to check the Enabled box!

The scripts are actually compiled on the displays. Unless we use the Compile All Scripts button, we don't know if there is a compile error or a logic error. The compile is not a part of the configuration validation. I have forgotten to use the Compile All Scripts button also, too many times :-(

I hope you get your cables soon also!
Sara Talley
Software Engineer
Enovation Controls