Jump to content
OMRON Forums

Problem in Ethernet Response


guonaldo2
 Share

Recommended Posts

Hello everyone,

I am using Clipper for my multi-axis control system. Since we did not purchase the DPRAM option, so I want use the Ethernet to get the current angle and velocity for further purpose.

For example , I wrote a PLC program to calculate the angle in arc-second and save it in P101. And I wrote a program in my upper computer which runs real time operating system constantly get the actual angle.

The result is that, there is a unbearable delay during the response. I send P101 to PMAC and wait for its return, it took about 1.5 ms!! I wonder if there is any good ways of getting the angle with less than 50us delay.

 

 

Thanks!

Link to comment
Share on other sites

  • Replies 15
  • Created
  • Last Reply

Top Posters In This Topic

I have a idea. What of I use CMDP"P201" in PLC program. Since I get multi axis, if I do as follows, I will not be able to distinguish each other

 

P201 Axis1

P202 Axis2

P203 Axis3

[undefined=undefined]

OPEN PLC 0 CLEAR

CMDP"P201"

CMDP"P202"

CMDP"P203"

Close[/undefined]

 

So what should I do if I want to add seperator between each axis and send them to upper computer?

e.g. My desired protocol

**Axis1//Axis2//Axis3**

Link to comment
Share on other sites

Ethernet response is affected by the operating system outside of PMAC's control.

 

You cold use the SENDP"" to 'mark' the responses as in:

OPEN PLC 0 CLEAR

SENDP"Axis1="

CMDP"P201"

SENDP"Axis2="

CMDP"P202"

SENDP"Axis3="

CMDP"P203"

Close

 

This would add extra time though.

 

Thanks! But 0x0D 0x02 are always added after every SENDP, how can I get rid of them?

 

BTW: If I use RS232 on the clipper and want to send the axis angle at 200hz from RS232, will PLC program fulfill the task exactly?

Link to comment
Share on other sites

I62 permits the user to control whether internally generated messages sent from Turbo PMAC to the host

computer are terminated with the carriage return () character or not. If I62 is set to 1, the

is suppressed.

 

I64 permits PMAC to tag ASCII text lines that it sends to the host computer as a result of internal commands, so these can easily be distinguished from responses to host commands.

If I64 is set to 0, a text line sent in response to an internal PMAC command is not preceded by any special character.

Link to comment
Share on other sites

I62 permits the user to control whether internally generated messages sent from Turbo PMAC to the host

computer are terminated with the carriage return () character or not. If I62 is set to 1, the

is suppressed.

 

I64 permits PMAC to tag ASCII text lines that it sends to the host computer as a result of internal commands, so these can easily be distinguished from responses to host commands.

If I64 is set to 0, a text line sent in response to an internal PMAC command is not preceded by any special character.

 

 

Thanks. That's really helpful. Why not try further?

I wonder if clipper could send all the information I need in one package. When I look at the signal on the oscilloscope, they've been seperated since I used multi commands such as sendp commandp. So how do I transfer all the data in one package? Or what if I wrote my data into the serial send buffer?

Link to comment
Share on other sites

I62 permits the user to control whether internally generated messages sent from Turbo PMAC to the host

computer are terminated with the carriage return () character or not. If I62 is set to 1, the

is suppressed.

 

I64 permits PMAC to tag ASCII text lines that it sends to the host computer as a result of internal commands, so these can easily be distinguished from responses to host commands.

If I64 is set to 0, a text line sent in response to an internal PMAC command is not preceded by any special character.

 

 

Thanks. That's really helpful. Why not try further?

I wonder if clipper could send all the information I need in one package. When I look at the signal on the oscilloscope, they've been seperated since I used multi commands such as sendp commandp. So how do I transfer all the data in one package? Or what if I wrote my data into the serial send buffer?

 

 

Any possiable solutions?

Link to comment
Share on other sites

You can control the serial port directly through a PLC. See the description of I43 in the Turbo Software Reference manual for implementation details.

 

 

Thanks. Is M variable 16bit or 32 bit? I want to use M variable to send the angle and speed.

Link to comment
Share on other sites

  • 2 weeks later...

M-variables are defined to a memory location and will take that memory location's bit structure. An undefined M-variable is a 48-bit integer.

 

Hi steve.milici, I have another problem.

 

In the latest firmware, I43 has an additonal function which allows users to access the serial port in their own way.

Now, the main serial port has the 255-byte long commandbuffer:

X:$003600 … $0036FF

 

"Only the low byte (bits 0 – 7) of each word in the command and response queues is used."

 

I want to send the M162 (which stand for the actual position*Ixx08*32) through main serial port. And in my case, the motor will not exceed 360 degrees which means M162 will not exceeds 0x481200000 which is a integer of 36bit.

So if I define the M variable as follows :

M162->D:$00008B
P1 = M162
M1->X:$003600,8
M2->X:$003601,8
M3->X:$003602,8
M4->X:$003603,8
M5->X:$003604,8
M6->X:$003605,8
M7->x:$003606,8
M100->X:$FFFFE6
M101->X:$FFFFE0,23

then:

 

M1 = P1%256
P1 = P1/256
M2 = P1%256
P1 = P1/256
M3 = P1%256
P1 = P1/256
M4 = P1%256
P1 = P1/256
M5 = P1%256
P1 = P1/256
M6 = P1%256
P1 = P1/256
M7 = '$'

and each time I have to DIVIDE 256 one by one. So does the second axis.

 

M100 = 7
M101= 0
M101 = 1   ;initiates the transmission of data

 

Is there any other easier way that I can choose? Or is there anything wrong with my code since the firmware of my clipper is updating in Deltatau.

Link to comment
Share on other sites

M-variables are defined to a memory location and will take that memory location's bit structure. An undefined M-variable is a 48-bit integer.

 

In the latest vesion of Turbo SRM, I saw an update as follows:

 

11

INCORPORATED V1.946-47 FIRMWARE UPDATES

ADDED TO I43 DESCRIPTION

FIXED TYPOGRAPHICAL ERRORS

12/19/12

CW

C. WILSON

 

This means that using I43, I can send the data as I want through serial port. Now the firmware version is V1.945. Is this function(I43) still available in this version? Or Should I update to V1.946 if I want to take advantage of the update?

Link to comment
Share on other sites

This feature was implemented in firmware version 1.941.

 

If you only wish to send the value of M162 out the serial port you can do that without using I43. Use the statement COMMANDS"M162" in your program. this will cause PMAC to issue the response to the main serial port. You can put multiple variables in the "" as in COMMANDS"M162 M167 P1".

 

If I62=0, Turbo PMAC issues a carriage-return (< CR >) character automatically at the end of any data response to the command. If I62=1, Turbo PMAC does not issue a < CR > character at the end of the data response; a SEND ^ M must be used to issue an < CR > in this case. In this way you can "format" your responses to the host.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share


×
×
  • Create New...