News:

  • October 17, 2026, 07:57:14 PM

Login with username, password and session length

Author Topic: ASCII Text to C-More  (Read 10330 times)

RBPLC

  • Hero Member
  • *****
  • Posts: 586
ASCII Text to C-More
« on: March 28, 2021, 07:13:46 AM »
I am currently using BRX to Modbus read ASCII coded characters from one device. Characters come into BRX correctly and ASCII values are displayed correctly in BRX when choosing ASCII in the Data view. I'm try to combine several of these read characters into a string that can be sent to a C-More panel. For example, I'm trying to take ASCII coded characters in V100-V109, combine them together to form a word which is stored in ss100 and have this sent to C-More. I've tried STRPRINT but all I'm able to do is store the integer representations into ss100. What am I missing?

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3628
  • Darth Ladder
Re: ASCII Text to C-More
« Reply #1 on: March 28, 2021, 12:10:43 PM »
Can you target a string with MEMCOPY?   I don't think so.

Look at STRPUTB and STRGETB.
« Last Edit: March 28, 2021, 12:15:15 PM by Controls Guy »
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3628
  • Darth Ladder
Re: ASCII Text to C-More
« Reply #2 on: March 28, 2021, 12:12:18 PM »
The other option would be to get everything lined up in contiguous numeric memory and tell the C-More to display as text.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

RBPLC

  • Hero Member
  • *****
  • Posts: 586
Re: ASCII Text to C-More
« Reply #3 on: March 28, 2021, 12:22:44 PM »
Figured it out. Within STRPRINT: Print to SS100, Raw(V100,1) Raw(V101,1)...

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3628
  • Darth Ladder
Re: ASCII Text to C-More
« Reply #4 on: March 28, 2021, 12:24:58 PM »
Figured it out. Within STRPRINT: Print to SS100, Raw(V100,1) Raw(V101,1)...

Thank you!  I have some places I'm  using STRxxxB, whichever it  is, and I think I might like that better!
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6177
  • Yes Pinky, Do-more will control the world!
Re: ASCII Text to C-More
« Reply #5 on: March 28, 2021, 01:45:25 PM »
There's overlap, but STRXXXB was intended to move the entire string content in and out for comms, whereas Raw() was for building strings.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3628
  • Darth Ladder
Re: ASCII Text to C-More
« Reply #6 on: March 28, 2021, 03:25:06 PM »
I'm squarely in the overlap.  STRxxxB is being used to import bytes from HMI MHR, but then they're used as building blocks for longer strings anyway, so I could go either way.  Will see which way feels cleaner.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.