PDA

View Full Version : Sioc encoder



Alb Calderon
10-02-2014, 10:53 PM
hi ¡

i used the sioc creator to create the variable for the heading encoder and run the ssi script on sioc.exe
the variable looks like that

Var 0001, name HDG_ENC, Link IOCARD_ENCODER, Input 1, Aceleration 1, Type 2

i'm sending the serial message to iocp Arn.Resp:1=1: to increase heading and Arn.Resp:1=0: to decrease but it doesn't work. how can i use Arn.Resp to change heading from encoder ?? i'm using an arduino with phyton script to connect to iocp thanks.

jeehell
10-06-2014, 05:28 PM
Hi

To decrease, you must send a negative value (-1).
Also don't forget to send the CRLF bytes at the end of the TCP frame, in pseudo code:
'Arn.Resp:1=1:' + $0D + $0A
and
'Arn.Resp:1=-1:' + $0D + $0A

Regards,
JL

Alb Calderon
10-06-2014, 10:25 PM
thanks JL !!

It works now :) i just added Arn.Resp:1=0 in both to indicate that encoder has stoped it works more faster than lua script thanks again !!!!