Jump to content

Recommended Posts

I'm using Vision120 and want to receive serial message from DRO.

The message format is follows

X=999.9999 Y=999.9999+cr+lf

or

X=-99.9999 Y=-99.9999+cr+lf

The leading zero will be supplessed by space.

Total length is fix.

Integer value is vary and signed.

In front of Y is space.

When I setup Protocol Scan FB as

X=111111111 Y=222222222+ETX

111111111 is defined deciaml ASCII fixed length, vector=1,decimal point=MI20(10000), Lenhth=8

prefix=-(negative) only, link ML1

ETX is defained as length=2, 1st one is 0D, 2nd one is 0A.

222222222 is defined deciaml ASCII fixed length, vector=1,decimal point=MI20(10000), Lenhth=8

prefix=-(negative) only, link ML2

ETX is defained as length=2, 1st one is 0D, 2nd one is 0A.

The FB protocol config return status code=258 (Invalid message)

When I setup as

111111111111111111111+ETX

111111111111111111111 is defined as stream vector length 21, convert 1 receive bite to 1 liked element,Link=DW0

This code can success.

And message stored correctry.

But It are word data, and need to convert numerical data.

It is not smart.

Does anybody knows the correct setting for this message format?

Naoto

Link to comment
Share on other sites

  • 4 weeks later...

Another quest about Protocol :

I'm using V350-TU24 and want to receive message like " >1[CR] "   after request  (Send " &321[cr] ")  via Port2  RS485.

STX and ETX  of Scan   sets  for   3E  (i.e.">")  and   0D  ([cr]).  Pattern message=  "1"

When I send legal message from the hex terminal  "  3E 31 0D  "  , V350 recognizes this message as alien -   Index= -1 ,  Session complete=0

When I add at begin "0D",  and send  "  0D 3E 31 0D  "  ,  all working properly.   But why this 0D ?!

! if I try to turn off the step Send request,  it works without  0D ..  and with 0D..  But the efect on the "Number recieved bytes" ..

Serial monitor of the V350 info mode displays everything correctly.

Visilogic 8.6.1.  OS of V350 updated.

HELP

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...