That`s pretty easy.
Try to get the standard of the protocol.
I did that and in a few hours worked fine.
Try this:
int address, function, register, quantity
address=incomingframe[0]
function=incomingframe[1]
register=(int)(incomingframe[2]+incomingframe[3])
quantity=(int)(incomingframe[4]+incomingframe[5])
if addres==myAddress then
select case function
case 0: break;
case 1:
case 2: //send data required by register and quantity
case 3:
case 4: //send data required by register and quantity
case 6: //write single register
case 15: //write multiple coils, mask found within message
case 16: //write multiple holdings, asi sent in incoming message
end case;
endif;
good luck.
Try to get the standard of the protocol.
I did that and in a few hours worked fine.
Try this:
int address, function, register, quantity
address=incomingframe[0]
function=incomingframe[1]
register=(int)(incomingframe[2]+incomingframe[3])
quantity=(int)(incomingframe[4]+incomingframe[5])
if addres==myAddress then
select case function
case 0: break;
case 1:
case 2: //send data required by register and quantity
case 3:
case 4: //send data required by register and quantity
case 6: //write single register
case 15: //write multiple coils, mask found within message
case 16: //write multiple holdings, asi sent in incoming message
end case;
endif;
good luck.
댓글
A notable difference among the three software programs is the guarantee they give.
Oftentimes, other online SEO software forgets this very important function.
My blog post :: article builder