Jump to content

Recommended Posts

  • MVP 2014
Posted

Does any one have comments good or bad about using ML values to store ASCII strings?

I have been debugging an application where the FB Protocol was used (serial), on a V350.

It is Visilogic 9.0.1 with the latest publically released OS

The app has a CopyBuffer block, copying to ML values, with 4 bytes per linked operand. The vector of MLs is then linked to an HMI display.

However when data is received on the serial port, nothing is stored into the vector of MLs, or displayed on the screen. When I manually type some ASCII codes into the ML values, the characters appear on the linked HMI element, so at least that part is working.

With exacly the same logic, I changed the ML to MI and it all works fine.

So, has anyone else had a problem, and has anyone else got it working?

Posted

Good question, Joe. I don't see any reason to use ML instead of MI. But - there must be no any problem to work.

Which kind of variable is used? What is the settings? It needs to be "Link four received elements to one operand". This is the only problem I canguess about...

  • MVP 2014
Posted

I suspect no-one uses the ML for ASCII, except for newbies. Visilogic allows you to do it, so yes it should work, but in my experience there seem to be some problems. These probably haven't been found becuase the ML are not frequently used for ASCII.

Why? I suppose it seems more efficient, as half the number of ML compared to MI are required to store a string. Also, the MI are generally used for standard programming tasks, so putting the ASCII in ML values keeps the MI area free for other use. This is somewhat a moot point as even the V120 offer 2048 MI values, but to each their own.

If I have the opportunity I will make up a basic example for support to take a look at. If I uncover any of my own mistakes I will be sure to post an update.

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.