andre_teprom

gx works3 FX5CPU: How to handle bytes in a simple way?

3 posts in this topic

Hi there!

 

Once there is no 8-bits native type available for this platform (instead, only single bit, 16 and 32 bits are supported), I would like know if anybody here has some Function Block (FB) that do this job, or rather, if there is a trick to do that. I could not realize a simple way so far.

The problem that I'm facing now is that in order to handle the TCP protocol, it is necessary to handle byte per byte.

 

Thanks in advance,

Andre.

types.png

[EDIT]

 

I found instructions WTOB,  SHL and  SHR which seems candidates to be used....I'll make experiments with it.

Edited by andre_teprom
added useful information

Share this post


Link to post
Share on other sites

Hi Andre,

     Yes you can use WTOB OR BTOW to handle bytes...

   For further clarification contact me..

Share this post


Link to post
Share on other sites

What are you trying to accomplish ? as a word is just two bytes anyway there are many ways to handle this.
If you are making a driver for ethernet have you taken a look at pre-defined protocol ?

Share this post


Link to post
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