Need Sample code to read/write to PV450 device

Discuss issues and ideas you have to configuring displays with PowerVision
gcsupport
Posts: 21
Joined: Mon Oct 07, 2013 8:15 pm

Need Sample code to read/write to PV450 device

Post by gcsupport » Mon Mar 23, 2015 1:17 am

Hi,

can anyone please provide a sample C# code to connect to PV450 device to read and write data.
stalley
Enovation Controls Development
Enovation Controls Development
Posts: 618
Joined: Tue Mar 18, 2014 12:57 pm

Re: Need Sample code to read/write to PV450 device

Post by stalley » Mon Mar 23, 2015 8:33 am

Hello gcsupport,

Are you posting in this forum because you want to use CANCapture to communicate to a display?

Do you want to communicate using the CAN interface?

What kind of information do you want to read/write?

It would be helpful to have more specific information about what you would like to do.
Sara Talley
Software Engineer
Enovation Controls
gcsupport
Posts: 21
Joined: Mon Oct 07, 2013 8:15 pm

Re: Need Sample code to read/write to PV450 device

Post by gcsupport » Mon Mar 23, 2015 9:29 am

Hi stalley,

Thanks for the quick response.

We want to be able to control the screen displayed on the device based on logic that sits on a computer that the display is connected to.
stalley
Enovation Controls Development
Enovation Controls Development
Posts: 618
Joined: Tue Mar 18, 2014 12:57 pm

Re: Need Sample code to read/write to PV450 device

Post by stalley » Tue Mar 24, 2015 7:57 am

Hello,

The interfaces to the device are the CAN and the RS485. The RS485 is an Enovation Controls version of MODBUS and would be challenging.

The most likely candidate is the CAN. CAN is fairly simple and you are probably familiar with it. If you go to the CANCapture website, they have CAN ECOM libraries which have been used to develop CSharp programs for the computer to tell the device to behave as they need. There is some sample code there also that might help.
Sara Talley
Software Engineer
Enovation Controls
gcsupport
Posts: 21
Joined: Mon Oct 07, 2013 8:15 pm

Re: Need Sample code to read/write to PV450 device

Post by gcsupport » Thu Apr 09, 2015 8:10 pm

Sorry for not being very clear. What I am trying to do is when the butotn on the left or right of the Murphy's display is clicked is to send that down to the computer that is connected to the Murphy via serial. There is a windows application listening to the serial port. I need to be able to perform some actions ont he computer upon receiving that command when the button is clicked. Please let me know,
stalley
Enovation Controls Development
Enovation Controls Development
Posts: 618
Joined: Tue Mar 18, 2014 12:57 pm

Re: Need Sample code to read/write to PV450 device

Post by stalley » Fri Apr 10, 2015 11:40 am

Hello gcsupport,

The only protocol the serial port on the displays is the MODBUS protocol. The color displays can be configured to be a MODBUS slave or master. Your configuration would need to convert the keypress event to a value in a register.

The MODBUS is a fairly simple protocol and the specification is available free on the internet.
Sara Talley
Software Engineer
Enovation Controls
gcsupport
Posts: 21
Joined: Mon Oct 07, 2013 8:15 pm

Re: Need Sample code to read/write to PV450 device

Post by gcsupport » Mon Apr 13, 2015 7:57 am

Hi stalley,

Thanks for your information.is there any sample on how to configure MODBUS slave or master ? and how to store keypress events to store it in a register.Please let me know and if can provide sample config files.
stalley
Enovation Controls Development
Enovation Controls Development
Posts: 618
Joined: Tue Mar 18, 2014 12:57 pm

Re: Need Sample code to read/write to PV450 device

Post by stalley » Tue Apr 14, 2015 9:08 am

Hello gcsupport,

There are several MODBUS and keyboard sample configs under the PowerVision Configuration Studio forums.

I would like to move this topic over to the PowerVision forums since the questions and information here are related to PowerVision and not CANCapture.
Sara Talley
Software Engineer
Enovation Controls