contact
support
Download
order
news
AGG Software Forums
November 24, 2024, 01:48:49 AM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
: Welcome on our forum!
Home
Help
Search
Login
Register
AGG Software Forums
>
Online Help Center
>
Data loggers and plug-ins
>
parse hex data
Pages: [
1
]
« previous
next »
Print
Author
Topic: parse hex data (Read 23714 times)
HHC
Jr. Member
Karma: +0/-0
Posts: 7
parse hex data
«
on:
April 28, 2020, 10:37:46 PM »
There is a hex data stream such as "E0 00 2C 01 E3 00 40 01" from serial port. Two bytes is for one data point, and after processing, it should be read as "00E0", "012C", "00E3", and "01 40".
Can data logger suite do this?
Logged
Arthur Grasin
Tech. Support
Administrator
Hero Member
Karma: +0/-0
Posts: 806
Re: parse hex data
«
Reply #1 on:
April 29, 2020, 07:58:22 AM »
Hello,
It is hard to extract data from this data packet because it does not have a beginning and ending signatures. Our logger can split data by a timeout but is not reliable.
Ok. If you split data packets by timeout.
1. Enabled the ASCII Data Parser plugin.
2. Configure it to split your database by a timeout.
3. Define three parser items with the "Fixed position" type and length of 2. Positions are 1, 3, 5.
4. Use the Expressions filter plugin and convert your parser items to a readable decimal value using a function like:
VALUE_DEC=WORDTOSTRBE(VALUE)
Logged
HHC
Jr. Member
Karma: +0/-0
Posts: 7
Re: parse hex data
«
Reply #2 on:
April 29, 2020, 03:11:03 PM »
Thanks Arthur,
I tried per your method. Sorry i am new to Data Logger. i actually did not really understand how to do - your step 3 and 4.
But it did not work. My setting is in the attached PDF documents.
Could you please help to check where i did wrong?
hex to dec Big-Endian.pdf
(380.33 KB - downloaded 1 times.)
Logged
Arthur Grasin
Tech. Support
Administrator
Hero Member
Karma: +0/-0
Posts: 806
Re: parse hex data
«
Reply #3 on:
April 29, 2020, 03:36:03 PM »
1. Set the "String" data type for all parser items.
2. Set a unique item name for all parser items.
3. For example, if you define the "VALUE_HEX_LOW" for the first item, an expression should lokk like:
VALUE_HEX_LOW_DEC=WORDTOSTRBE(VALUE_HEX_LOW)
4. Select the "Show parsed values" data view mode.
Logged
HHC
Jr. Member
Karma: +0/-0
Posts: 7
Re: parse hex data
«
Reply #4 on:
April 29, 2020, 04:52:09 PM »
Thanks Arthur!
i made some changes to my data parse setting in the attached PDF.
It works for "2C 01" - get a "300" number, but i get "NULL" when i try E0 00.
Also my question, whey here WORDTOSTR(X) works, not the WORDTOSTRBE(X)?
and how i input for the contents inside (X)? VAL1,VAL2,VAL3 or VAL1+VAL2+VAL3?
Many thanks!
hextodecBig-Endian-2.pdf
(340.29 KB - downloaded 1 times.)
Logged
Arthur Grasin
Tech. Support
Administrator
Hero Member
Karma: +0/-0
Posts: 806
Re: parse hex data
«
Reply #5 on:
April 29, 2020, 05:16:35 PM »
1. You do not need VAL3 in the parser settings.
2. Please, do not use VAL1+VAL2 inside WORDTOSTR()
VAL1_DEC=WORDTOSTR(VAL1)
VAL2_DEC=WORDTOSTR(VAL2)
Logged
HHC
Jr. Member
Karma: +0/-0
Posts: 7
Re: parse hex data
«
Reply #6 on:
April 29, 2020, 07:23:46 PM »
Thanks Arthur!
1. I did some changes again, still no luck for "E0 00". the setting and results are in the attached PDF. Could you please check my setting again?
2. Also, please advise me the purpose to set up VAL2 here. I had tried to delete the VAL2, no impact on the results.
3. WORDTOSTR(X) is to convert something in the (X) to decimal. Do we only need to put one variable inside the (), because the variable, say, VAL1, does have two bytes? if we need to put more than one variables, say T1 and T2, how should we do?
Thanks again!
hextodecBig-Endian-3.pdf
(320.9 KB - downloaded 1 times.)
Logged
Arthur Grasin
Tech. Support
Administrator
Hero Member
Karma: +0/-0
Posts: 806
Re: parse hex data
«
Reply #7 on:
April 30, 2020, 07:22:39 AM »
Could you please open a ticket at
https://support.aggsoft.com/
?
We'll schedule a remote support session and I'll help you with setup.
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
News & Feedbacks
-----------------------------
=> News and Updates
=> Site Comments
-----------------------------
Online Help Center
-----------------------------
=> Advanced Serial Port Monitor
=> Data loggers and plug-ins
=> Data loggers ActiveX
=> Advanced USB Port Monitor
=> Virtual Null Modem
=> Software for DNC and CNC
=> Other questions
-----------------------------
Development
-----------------------------
=> Feature Requests
Loading...