Author Topic: Communication between DP210 and microcontroller MC24-XXX  (Read 10820 times)

fhm1963

  • Guest
Communication between DP210 and microcontroller MC24-XXX
« on: January 24, 2012, 09:18:35 PM »
I need to know how communicate a display DP210 and a micro MC24-XXX. Can anyone tell me where I could find info of it?

Offline Jakob

  • PLUS+1 Expert
  • ****
  • Posts: 98
  • Karma: +2/-0
Re: Communication between DP210 and microcontroller MC24-XXX
« Reply #1 on: January 25, 2012, 12:07:16 PM »
If you use the standard CAN-tx and CAN-rx function blocks, you will be well on your way.
Just remember, all CAN-messages are type U8, and you will have to convert and check if your signals valid.

Offline Jakob

  • PLUS+1 Expert
  • ****
  • Posts: 98
  • Karma: +2/-0
Re: Communication between DP210 and microcontroller MC24-XXX
« Reply #2 on: January 31, 2012, 09:17:31 AM »
?

Maxim

  • Guest
Re: Communication between DP210 and microcontroller MC24-XXX
« Reply #3 on: May 16, 2013, 10:25:34 AM »
Hello,

This is an old topic but it is just what I need.

I have almost the same setup and I need to do exactly the same but I can't get this to work. Would it be possible to help me out on the connections that have to be made on the block?
The goal of the setup is to use the soft keys on the display to control the program in the controller.

This is the correct block?


I'm sorry but I have very little knowledge of this software, I was thrown in this due to illness of a colleague.

Thanks in advance.

Offline Jakob

  • PLUS+1 Expert
  • ****
  • Posts: 98
  • Karma: +2/-0
Re: Communication between DP210 and microcontroller MC24-XXX
« Reply #4 on: May 17, 2013, 02:28:58 PM »
Yes that is the right component for receiving a CAN message.
The RX function should be in the controller program.

Have you looked at the help file for this component, there are usually some helpful examples there.

Offline Jakob

  • PLUS+1 Expert
  • ****
  • Posts: 98
  • Karma: +2/-0
Re: Communication between DP210 and microcontroller MC24-XXX
« Reply #5 on: May 21, 2013, 09:11:28 AM »
Here is a simple setup for a can-bus connection.


Maxim

  • Guest
Re: Communication between DP210 and microcontroller MC24-XXX
« Reply #6 on: May 22, 2013, 01:56:31 PM »
Thank you so much, Jakob.
Got the network to communicate.
Only when I want to use a signal coming from a joystick, receive and view it on the display, I get: "error 15: [chpargu1] NET TYPE REDEFINED, SIGNAL: {AN72/} Type1: (S16) Type2: Bool.


Offline Jakob

  • PLUS+1 Expert
  • ****
  • Posts: 98
  • Karma: +2/-0
Re: Communication between DP210 and microcontroller MC24-XXX
« Reply #7 on: May 22, 2013, 04:04:25 PM »
Your welcome :)

The Error 15 you have means that you have connected a S16 type signal to an already defined Bool type signal.
Usually the compiler will tell where the conflict is located, or at least give a hint.

Like this one.
*** ERROR 15 ***  [chpargu1]   NET TYPE REDEFINED, SIGNAL: {AN217/} TYPE1: {U16} TYPE2: {CBOOL}
          DP250-01-01-0X-05-00T!TOP!Application!MudFlow!Input_scale (262,25)

It links and writes what page and location on the page (262,25).


Maxim

  • Guest
Re: Communication between DP210 and microcontroller MC24-XXX
« Reply #8 on: May 22, 2013, 04:29:54 PM »
Hmm,
When I do that is just links me to the 'define screen' block..



Offline Neil

  • PLUS+1 Expert
  • ****
  • Posts: 96
  • Karma: +2/-0
Re: Communication between DP210 and microcontroller MC24-XXX
« Reply #9 on: May 22, 2013, 09:39:30 PM »
Hi

In the screen editor/Screen Manager Tab, click on DataValue and pick up your BusMember1 port.
Personally I would call this signal what it is, if a Joystick signal that’s what I’d call it.

regards Neil

Maxim

  • Guest
Re: Communication between DP210 and microcontroller MC24-XXX
« Reply #10 on: May 23, 2013, 08:15:46 AM »
Problem Solved, communication working now.
Value had to be %5d instead of %d because the joystick value can positive and negative.

Thanks everybody!
« Last Edit: May 23, 2013, 02:28:43 PM by Maxim »

Offline Jakob

  • PLUS+1 Expert
  • ****
  • Posts: 98
  • Karma: +2/-0
Re: Communication between DP210 and microcontroller MC24-XXX
« Reply #11 on: May 23, 2013, 02:54:37 PM »
Nice.
That is the important thing :)

If you plan on making a larger project, I would agree with Neil that naming signals correctly is quite important for future understanding of the program.

regards Jakob

Maxim

  • Guest
Re: Communication between DP210 and microcontroller MC24-XXX
« Reply #12 on: May 24, 2013, 03:05:08 PM »
I've done that now, all members always have understandable names.

But now I have a new problem, when I want different pages to come up after a selection has been made (using buttons) I need my buttons again in that submenu.
So I tought I could use a counter including this setup (looks messy, just sketching to try it out) to enable the buttons for the active menu only.


But this doesn't seem to work.
Any other ideas?

Regards,
Maxim
« Last Edit: May 25, 2013, 08:45:01 AM by Maxim »

Offline Neil

  • PLUS+1 Expert
  • ****
  • Posts: 96
  • Karma: +2/-0
Re: Communication between DP210 and microcontroller MC24-XXX
« Reply #13 on: May 25, 2013, 02:59:47 AM »
Hi Maxim.

See the attached DP600 Simulator template it demonstrates one way how you can call on different pages with buttons.
Please be aware the code contained is snippets of more advanced code I have used in projects.
You are responsible for the code you develop.
I tend to use the simulator a lot to test code snippets, view images etc., it’s a great tool for development.
Final code should always be tested in hardware of course.

Compile the P1P and run the generated P1S file via the simulator software. If you want to latch a screen button, press the shift key when you click the button with your mouse.

Regards Neil.
   
« Last Edit: May 25, 2013, 09:42:26 AM by Neil »