Author Topic: MDS100-BW 9600 Baud  (Read 19738 times)

Petty_boy

  • Jr. Member
  • **
  • Posts: 53
  • I'm a llama!
    • View Profile
MDS100-BW 9600 Baud
« on: June 16, 2009, 09:40:04 AM »
Hi,

I Have two issues with the MDS100-BW.

A little history....

I'm using the TMD2424 to collect data from modbus devices on comm 3, display some info on the MDS100-BW also on comm 3.

Comm 1 is listening as a modbus slave.

1.  I'm using the MDS100-BW at 38400 baud no problems,  when I try to use 9600 baud the MDS100-BW screen doesn't  display any of  my messages.  I have set the jumper on the back and tried this on two MDS100-BW's both behave the same. I need this at 9600 baud as below.

2. I'm using comm 3 to communicate to a modbus device using the readmodb2, unfortunately this device is limited to 9600 baud, but this works fine.

Can I use the MDS100-BW also on comm 3? When I set the comm 3 baud to 38400 the display is garbled when I enable the readm2 command.

Do I need to give the MDS100-BW an ID number and use net commands instead of the Print #3 Function?

Can I use Comm 3 as a modbus master and hang the MDS100-BW display on the RS485 at the same time?

If not I could be in trouble!

Cheers
« Last Edit: June 16, 2009, 10:42:31 AM by Petty_boy »

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3171
    • View Profile
    • Internet Programmable PLCs
Re:MDS100-BW 9600 Baud
« Reply #1 on: June 16, 2009, 11:48:20 AM »
After you have to put the jumper on MDS100-BW to 9600 bps position and you must reset the MDS100-BW (power off and on) because it only determines the baud rate upon power up.

You need to use SETBAUD 3,3 to change the T100MD2424 to 9600,8,1,n.

You are using two distinctly different protocols on the same RS485 bus which is not recommended. We would suggest you use a dual pole dual throw relay controlled by a PLC output to multiplex the RS485 pair between the MDS100-BW and the Modbus slave. That way you ensure that each only receive the correctly formatted data. You can also run the MDS100-BW at 38400 bps and the Modbus RTU at 9600bps, since you can use SETBAUD to change the baud rate after the bus has been switched over to the target device.

If you don't want to use mutiplexing, then obviously if you had used the NETCMD$ and use the network command to talk to the MDS100-BW it would much less likely to display any garbled Modbus RTU data it sees. But since its serial buffer would be overrun by all the Mobdus RTU data bytes that its receives it is hard to know what effect it would on the next message it is supposed to display until you actually test it. It may still work but we can't guarantee nor would we recommend it.
« Last Edit: June 16, 2009, 11:51:25 AM by support »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

Petty_boy

  • Jr. Member
  • **
  • Posts: 53
  • I'm a llama!
    • View Profile
Re:MDS100-BW 9600 Baud
« Reply #2 on: June 16, 2009, 12:41:50 PM »
Hi,

Tried a hard reset after using the setbaud 3,3 but I get nothing....

38400 - 8 N 1 - no problems
38400 - 8 E 1 - no problems
9600 - any settings don't work?.

'SETBAUD 3, &H43 ' SET PORT 3 TO 9600 8,E,1

'SETBAUD 3, &H03 ' SET PORT 3 TO 9600 8,N,1

SETBAUD 3,3 ' SET PORT 3 TO 9600 8,N,1

'SETBAUD 3, &H06 ' SET PORT 3 TO 38400 8,N,1

'SETBAUD 3, &H46 ' SET PORT 3 TO 38400 8,E,1

I'm using the above in a custom function to test but i get no display @9600????

Regarding the network commands,  below is an example of what I'm displaying on the screen,  can you show me how to convert from a print #3 to netcmd?

PRINT #3 "?C"
PRINT #3 "?P0701";"SCREEN 2"
PRINT #3 "?P0102";""
PRINT #3 "?P0203";"START COUNT "+STR$(DM[15],4)
PRINT #3 "?P0104";"RUN HOURS  "+STR$(DM[17],4

Cheers

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3171
    • View Profile
    • Internet Programmable PLCs
Re:MDS100-BW 9600 Baud
« Reply #3 on: June 16, 2009, 10:46:12 PM »
Did you put a ' in front of SETBAUD? That means that SETBAUD statement is not even executed because it has been commented out.


Assuming the MDS100-BW ID = F0.

PRINT #3 "?C"

   convert to:   A$ = NETCMD$(3, "@F0?C")

PRINT #3 "?P0701";"SCREEN 2"

   convert to:   A$ = NETCMD$(3, "@F0?P0701SCREEN 2")

and so on.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

Petty_boy

  • Jr. Member
  • **
  • Posts: 53
  • I'm a llama!
    • View Profile
Re:MDS100-BW 9600 Baud
« Reply #4 on: June 17, 2009, 02:16:41 AM »
Hi,

I removed the ' before the setbaud when testing the different communication settings.  I can communicate to the modbus device @9600 when the plc is a modbus master so this is working.

The LCD just wont display any text @9600, after about 30 seconds it displays some random text.

Not sure why?? as soon as i go back to 38400 and reset the jumper and cycle the power all is OK??

maybe I'll try a basic blank test program but I think the result will be the same.

Many thanks.


Thanks for the netcmd example.

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3171
    • View Profile
    • Internet Programmable PLCs
Re:MDS100-BW 9600 Baud
« Reply #5 on: June 17, 2009, 05:22:53 AM »
When you put the jumper over J1 on the MDS100-BW, did you cap the jumper block over the two pins? i.e. the jumper block is supposed to short the two pins of J1 together. After that reset the MDS100-BW and it should be in 9600 bps. I just tried it and it works without any issue.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

Petty_boy

  • Jr. Member
  • **
  • Posts: 53
  • I'm a llama!
    • View Profile
Re:MDS100-BW 9600 Baud
« Reply #6 on: June 17, 2009, 05:59:24 AM »
Yes I did?

I will check to ensure the "jumper" is shorting the pins and let you know.

Funny this is the same for both displays?

Cheers

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3171
    • View Profile
    • Internet Programmable PLCs
Re:MDS100-BW 9600 Baud
« Reply #7 on: June 17, 2009, 08:49:11 AM »
When you power up the MDS100-BW with Jumper J1 shorted, are you able to send messages to it at 38400bps? If you still can send messages at 38400 but not at 9600 bps then something is not right - the MDS100-BW was not set to 9600bps at power up for whatever reaons.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

Petty_boy

  • Jr. Member
  • **
  • Posts: 53
  • I'm a llama!
    • View Profile
Re:MDS100-BW 9600 Baud
« Reply #8 on: June 17, 2009, 09:00:39 AM »
Sure,

I agree, I will test this.  I'm away until late tomorrow but I will post a reply as soon as I have tested the LCD.

Cheers

Petty_boy

  • Jr. Member
  • **
  • Posts: 53
  • I'm a llama!
    • View Profile
Re:MDS100-BW 9600 Baud
« Reply #9 on: June 19, 2009, 12:28:47 AM »
Hi,

This string is failing on Error:Syntax error, missing ')'

A$ = NETCMD$(3, "@F0?P0704 STR$(TIME[1],2)+":"+STR$(TIME[2],2)+":"+STR$(TIME[3],2))

I've tried adding a  ) in various locations with no success can you please correct?

P.s Still on-site, I will test the LCD later today.

Cheers

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3171
    • View Profile
    • Internet Programmable PLCs
Re:MDS100-BW 9600 Baud
« Reply #10 on: June 19, 2009, 01:28:04 AM »
A$ = NETCMD$(3, "@F0?P0704"+ STR$(TIME[1],2)+":"+STR$(TIME[2],2)+":"+STR$(TIME[3],2))
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

Petty_boy

  • Jr. Member
  • **
  • Posts: 53
  • I'm a llama!
    • View Profile
Re:MDS100-BW 9600 Baud
« Reply #11 on: June 19, 2009, 02:36:46 PM »
Ok Guys results below,

jumper open = 5VDC
jumper closed = 0VDC

The Baud rate options are on a first scan contact.

I used a simple custom function to send some data to the screen on a one second pulse.

for the BAUD options set on first scan:-

'SETBAUD 3, &H43 ' SET PORT 3 TO 9600 8,E,1

'SETBAUD 3, &H03 ' SET PORT 3 TO 9600 8,N,1

'SETBAUD 3, 3 ' SET PORT 3 TO 9600 8,N,1

SETBAUD 3, &H06 ' SET PORT 3 TO 38400 8,N,1

'SETBAUD 3, &H46 ' SET PORT 3 TO 38400 8,E,1

for the screen options:-

'PRINT #3 "?C"
'PRINT #3 "?P0801";"B & C "
'PRINT #3 "?P0502";"SYSTEMS LTD"
'PRINT #3 "?P0203";"PROJECT ID 090009"


A$ = NETCMD$(3, "@F0?C")
A$ = NETCMD$(3, "@F0?P0801B & C" )
A$ = NETCMD$(3, "@F0?P0502SYSTEMS LTD")
A$ = NETCMD$(3, "@F0?P0203PROJECT ID 090009")

No info is displayed at 9600 via net command or print #3 on both of my MDS displays.

Both print #3 and netcmd  info displayed no problems @ 38400 8 N 1

When using 38400 8 E 1  the netcmd is SLOW, the display is updated one column at a time as per 1 sec pulse??  the print function updates the screen as 8 N 1?? (normal)

I tested this on both MDS's purchased from your UK dealer about 2 months ago.  Are they the latest? can i check firmware etc?

Tested the above on two tmd24's with r49 and r50 firmware.

Seems to me that a MDS firmware update is needed or these need to come back to you guys for testing??

I can email the program to you for testing if required but it is as above.

Don't forget the plc talks fine to the modbus slave device @ 9600 so i'm pretty sure the MDS's have issues!

Cheers


« Last Edit: June 19, 2009, 03:41:45 PM by Petty_boy »

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3171
    • View Profile
    • Internet Programmable PLCs
Re:MDS100-BW 9600 Baud
« Reply #12 on: June 19, 2009, 11:01:51 PM »
MDS100-BW does not support parity. So you can only use 9600,8,N,1 or 38400,8,N,1.

When you first power on the MDS100, what is the message you see on the display?

Also did you test whether the MDS100 would display incoming 38,400 bps serial data when its jumper J1 is ON?
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

Petty_boy

  • Jr. Member
  • **
  • Posts: 53
  • I'm a llama!
    • View Profile
Re:MDS100-BW 9600 Baud
« Reply #13 on: June 20, 2009, 12:52:58 AM »
Hi,

When the display is initially powered on @38400 or 9600 i get a flashing cursor.

I did try to send commands @38400 with the jumper on and it didn't respond so it must be in some mode?!?

I will test a  little more today.

Cheers




Petty_boy

  • Jr. Member
  • **
  • Posts: 53
  • I'm a llama!
    • View Profile
Re:MDS100-BW 9600 Baud
« Reply #14 on: June 20, 2009, 01:01:13 AM »
Hi,

I just did one more test.  the modbus slave is 9600 8 E 1 I disconnected this completely, it has been connected and disconnected during the testing to see if if made any difference.

If the MDS doesn't support parity, I will have to change my modbus slave model.

The screen still doesn't respond to commands.

Cheers