VersaMax 14 Point Micro PLC-Communication Problem

mani.sarathy

Member
Join Date
Aug 2002
Posts
5
I am having trouble in getting a VersaMax Micro PLC to communicate with a custom designed Operator Interface-via the
Port 1(The Port with an RJ45 Connector).I have set the communication parameters to the default-19200BPS,Pqrity-Odd,Stop Bits-1,
Data Bits-8.I am trying to get my Microcontroller Based HMI/OI to read from the PLC using SNP and SNPX Protocols.
1) I transmit the Long Break(Taking TxD Line to the SPACE State) for at least three character times.(For a default comm Baud Rate
of 19200BPS, I have held the TxD Line in the SPACE state for 50ms).
2)Next, I wait for T4 time = 100ms.
3)Then I transmit the Attach Message (for SNP) and X-Attach Message for SNPX wherein the PLC CPU ID is set to NULL as it is a Point
-to-Point Communication.
4)Next, I wait for T1 time = 10ms and then check for Attach Response(or X-Attach Response).
I am not able to elicit a response from the PLC at all.It is mentioned in the SNP Communications User's Manual and in the
Serial Communications User's Manual, that there will be no reponse from the PLC in the case of an error in an Attach Message.For
the other Messages, if there is an error, I will either get an error message or an NAK.So, if there is an error,I would like to know
what it actually is.I am including the SNP and SNPX message streams I sent for the Attach and X-Attach Messages respectively.

SNPX Attach Message: 1b 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 17 00 00 00 00 79

SNP Attach Message: 1b 41 00 00 00 00 00 00 00 00 30 35 30 30 30 20 20 20 17 00 00 00 42 39

I hope ypu can help me out at the earliest with regard to this and point out where exactly I am going wrong.
Thank You,
Yours Sincerely,
P.Mani.
 
I calculated the same checksum as you did for the X-Attach message.

Are you sure of the cable connections between your HMI and the RJ-11 connector? It's easy to mirror the pin numbers on them.

Could your microcontroller be swapping the high and low bytes so that 1B gets transmitted as B1?

Try connecting your HMI to a computer running a terminal emulator such as PROCOMM, or even Hyperterminal to see what it is actually transmitting.
 
Reply to Mr.Bailey

I first wish to Thank You for your prompt response.I would also like to inform you that testing my program with the Hyperterminal was one of the first things I did as soon as I had this problem.I also wanted to check if my program was communicating correctly at 19200BPS and it worked fine with the Hyperterminal.
Also, my microcontroller program sends byte as they ar to the PC and does not swap them. This too I was able to find out using the Hyper-terminal.
I am not able to find out exactly where I am going wrong. I was able to communicate with the PLC using the TestComm PC utility available from the GE Fanuc web-site. This utility apparently sends the messages
in the same sequence as I have posted in my query. But, still I am not able to communicate with the PLC using my microcontroller.
I hope I can get a solution to my problem soon as I would very much like to get this application running at least by this monthend.
 
Have you tried running the TestComm utility connected to Hyperterminal to see if it sends the same characters and checksum as your microcontroller?

Could your microcontroller be appending CR/LF characters to the end of the transmitted string?

It could also be a hardware problem. You may want to look at the TxD line with a scope to make sure you're transmitting a clean signal at appropriate voltage levels. Compare the scope trace of your microcontroller's output with the output from the computer running the TestComm utility.
 
SNP or SNPx

3)Then I transmit the Attach Message (for SNP) and X-Attach Message for SNPX wherein the PLC CPU ID is set to NULL as it is a Point
-to-Point Communication.

Does this mean that you are sending both the SNP Attach AND the SNPx Attach? If so that may be the problem, a slave device will respond to one OR the other NOT both.
Also the VersaMax PLC is a "Breakless" SNP device. It should respond to either Attach commands without the Break, you may want to try this.

Good Luck and please keep us informed so we can learn with you.
 
PLC-HMI Communication Problem-Continued

Thank you again for your promptness.
1) The TestComm utility does indeed transmit the same checksum as I have calculated.This can be seen from the utility window
which echoes the characters - it transmits to the PLC - on the PC screen.
2)No, my microcontroller does not transmit CR/LF character(s) after each character or sequence/string of characters. This I have
been able to check as I have designed some MODEM interface projects in which I use some AT commands. For these commands,
unless I send the ASCII code 0Dh(Hex) for "Enter",as part of the message string, the microcontroller does not do it.
3)I will try checking the TxD line signal on the Oscilloscope as you have suggested, Mr.Bailey, (unfortunately/fortunately,I have not
yet tried this and will let you know the outcome.). But as I have mentioned, I have interfaced to MODEMs and have not had any Tx/
RX signal problems. Anyway, Thank You very much for the tip. I was so tensed up, that this did not occur to me.
4)I use Either SNPX Or SNP to communicate to the PLC. I meant to convey that I have tried to communicate with the PLC using both
SNP and SNPX Protocols.
5) Also, I would like to Thank You for informing me that VersaMax supports Break Free SNP/SNPX operation. As I am new to PLCs, I
was not aware of this.
6) Yes, defenitley I will let you know of the progress in my work with the GE Fanuc PLC and will let you know if I am able to get the
HMI working. But, in the meanwhile, I would be very much obliged, if you can keep the tips/suggestions/solutions pouring in.
Thank You,
Mani Parthasarathy
 
What Steve said about proper voltage levels could be the problem. Are you using a driver/reciever as an RS-232 interface between the PLC and the micro. I'm using a Maxim 233 to interface between my micro and a Micrologix 1200.
 
HMI-PLC Communication Problem-continued

Hi
I was working on the PLC-HMI Project the whole of yesterday, trying to figure out what was wrong.
I tried checking the voltage levels on a CRO and found no problems there.
I generally use a MAX232 or an SP232 transceiver and so I don't think there is any problem with those transceivers. Also, as the
microcontroller is able to properly communicate with other systems like PCs, MODEMs etc, I don't think there is any problem with
the transceivers themselves.
I also used a serial port monitoring utility, PortMon, and tried to monitor the Com Port activity when the TestComm utility was
communicating with the PLC via port1. I wanted to see if there were any other transactions taking place before or after each
message sequence. But I observed no such transactions. The PC(TestComm Utility) transmitted the Long Break followed by a 100ms
delay and then the the X-Attach or Attach message followed by a 10ms delay. Then it waited for the PLC to respond with the Attach
or X-Attach meesage (depending on the protocol being SNP or SNPX).
Finally, I was able to locate the problem. In the SNPX message, as given below, the PC apparently seems to receive only few of the
characters. This, I was able to observe with the Hyperteminal. I am not talking about the NULL/ESC character which cannot be
printed or displayed. The PC receives/displays 17h and 79h only.

SNPX Attach Message: 1b 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 17 00 00 00 00 79

It displays 58h when I insert four NULLS between 1bh and 58h. I don't know why this padding is necessary.

For SNP Message, it displays 42h,39h,30h,35h,30h,30h and 30h. It skips 41h(A) and other characters.

SNP Attach Message: 1b 41 00 00 00 00 00 00 00 00 30 35 30 30 30 20 20 20 17 00 00 00 42 39

Further, this thing does not happen when I am transmitting other characters (as I already mentioned, when I transmit AT commands
or any other character for that matter). However, the PLC, because of the missing characters, does'nt respond.
I thought maybe the microcontroller is not communicating properly at 19200BPS when we use 9 data bits(8 data bits + 1 parity) and
so tried sending some AT commands and junk characters continuously. The PC (Hyperterminal) received these characters without
any hitch.
I faced the same problem again (when I transmittted an SNP/SNPX Message) when I tried to communicate with the PC and PLC (at
19.2KBPS, 8 data bits, 1 odd parity and 1 Stop bit) using two other microcontroller.
I hope someone can suggest some means or way of getting around this situation or any other feasible solution to get the PLC to
communicate with the microcontroller.
Thank You,
Mani Parthasarathy
 
check your cable pin assignment. Try this cable configuration.


for PLC connector: Short CTS and RTS.

RJ45 Operator Interface

GND--------------------------GND

Tx---------------------------Rx

Rx---------------------------Tx
 
Hello Steve.

I do have a problem with a GE Versamax micro.
As soon as I go online on Port 1 the OK led
goes off.
On Port 2 no reaction at all
Cable and settings are tested on another Versamax micro and are working well.

Regards
John
 

Similar Topics

I want to simulate time in PLC to check the sequenced control Loop that separated by timing such as 8 pm, 9 pm . Please help me how to simulate...
Replies
1
Views
1,146
dear all, We have fanuc versamax Micro PLC, I have Proficy Machine edition 5.7 version, I want to upload exisiting program from the PLC. Please...
Replies
7
Views
6,071
I have one GE Fanuc IC200PNS002-AC Versamax Network Interface Module and the fault red light is blinking and i have checked in manual it is...
Replies
9
Views
170
Hi, The VersaMax PLC suddenly stop running (no LED on run function) so I'm trying to upload the program. The HMI connected to it says "Host...
Replies
0
Views
117
I do have a problem with a GE Versamax micro PLC. By going online (on Port 1) the "OK led" goes down. Power led stays On Port 2 no reaction at...
Replies
4
Views
370
Back
Top Bottom