Jump to content

Recommended Posts

  • MVP 2014

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?

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

  • MVP 2014

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...