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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.