Support Forums
Serial RS485 Commands

Hello,

I have moved to a new RS485 device that is sending data to a DT80.

In the past I used an RS232 device and it worked correctly.

The issue is with reading the packets of data and storing them into CVs. The old RS232 device used ";+" between the data to break up each value, then it could be stored into separate CVs.
I simply put these in between each serial input command and it worked just fine, (%f[1CV];+%f[2CV];+......).

The new unit uses Tabulation between values and I'm not sure how to enter this into the DT80 to store each one into a different CV.

I have tried a few different methods such as using a space, colon and commas to try to break up the data, to no avail.

I have attached the serial format of the device in question. The Serial Sensor port is also configured at the start of the program for the required settings, (RS485, 38400, N, 8, 1, NOFC).

5cb577b3e0131

If you could provide any help that would be greatly appreciated.

Hello, I have moved to a new RS485 device that is sending data to a DT80. In the past I used an RS232 device and it worked correctly. The issue is with reading the packets of data and storing them into CVs. The old RS232 device used ";+" between the data to break up each value, then it could be stored into separate CVs. I simply put these in between each serial input command and it worked just fine, (%f[1CV];+%f[2CV];+......). The new unit uses Tabulation between values and I'm not sure how to enter this into the DT80 to store each one into a different CV. I have tried a few different methods such as using a space, colon and commas to try to break up the data, to no avail. I have attached the serial format of the device in question. The Serial Sensor port is also configured at the start of the program for the required settings, (RS485, 38400, N, 8, 1, NOFC). ![5cb577b3e0131](serve/attachment&path=5cb577b3e0131) If you could provide any help that would be greatly appreciated.

Hi Nick,

First you need to set up dataTaker port setting, you will need to use SERIAL port in front of the logger (Sersen Port).
1SERIAL will become your channel declaration for that port.

PROFILE SERSEN_PORT BPS=38400
PROFILE SERSEN_PORT FLOW=NONE
PROFILE SERSEN_PORT MODE=RS485

Then to parse the incoming string, you can do one by one like this example:
1SERIAL("%2d","Date")
1SERIAL(".%2d","Month")
1SERIAL(".%4d","Year")
1SERIAL("%*1s%2d","Hour")
1SERIAL(":%2d","Minute")
1SERIAL(":%2d","Second")
1SERIAL("%d","Flags")
1SERIAL("%d","Status")
....

Any space will terminate the conversion (space will act as a border for conversion).

Other than the above method, you may also use a single line for parsing:
1SERIAL("%2d[1CV].%2d[2CV].%4d[3CV]%*1s%2d[4CV]:%2d[5CV]:%2d[6CV]%d[7CV]%d[8CV].....")
1CV("Date")
2CV("Month")
3CV("Year")
4CV("Hour")
5CV("Minute")
6CV("Second")
7CV("Flag")
8CV("Status")

%d will convert the incoming string as decimal (integer), while %f will convert the string into floating point.

If you do not want to assumed the incoming string as number, you may capture them as string %S (white space will become parsing termination again).
Example flags, if you want to maintain hexadecimal entry %S must be used.
As a result of using %S, you must save it into string variable %S[1$]

Best regards,
Rudy Gunawan

Hi Nick, First you need to set up dataTaker port setting, you will need to use SERIAL port in front of the logger (Sersen Port). 1SERIAL will become your channel declaration for that port. PROFILE SERSEN_PORT BPS=38400 PROFILE SERSEN_PORT FLOW=NONE PROFILE SERSEN_PORT MODE=RS485 Then to parse the incoming string, you can do one by one like this example: 1SERIAL("%2d","Date") 1SERIAL(".%2d","Month") 1SERIAL(".%4d","Year") 1SERIAL("%*1s%2d","Hour") 1SERIAL(":%2d","Minute") 1SERIAL(":%2d","Second") 1SERIAL("%d","Flags") 1SERIAL("%d","Status") .... Any space will terminate the conversion (space will act as a border for conversion). Other than the above method, you may also use a single line for parsing: 1SERIAL("%2d[1CV].%2d[2CV].%4d[3CV]%*1s%2d[4CV]:%2d[5CV]:%2d[6CV]%d[7CV]%d[8CV].....") 1CV("Date") 2CV("Month") 3CV("Year") 4CV("Hour") 5CV("Minute") 6CV("Second") 7CV("Flag") 8CV("Status") %d will convert the incoming string as decimal (integer), while %f will convert the string into floating point. If you do not want to assumed the incoming string as number, you may capture them as string %S (white space will become parsing termination again). Example flags, if you want to maintain hexadecimal entry %S must be used. As a result of using %S, you must save it into string variable %S[1$] Best regards, Rudy Gunawan

Hi Rudy,

Thanks very much for your assistance with this. smile I think I had most of it correct, except I wasn't parsing the date/time as individuals entries, just trying as one large chunk.

I have written the program like you said, but I am getting a "Serial sensor receive timeout at control string position 11" error.

'JOB=JOB1
'COMPILED=2014/11/12 09:12:35
'TYPE=dt80
DT=\d
001: BEGIN"JOB1"
002: CATTN
003: 'Spans and polynomial declarations
004: 'Thermistor declarations
005: 'Switches declarations
006: 'Parameter declarations
007: 'Global declarations
008: RS1S
009: 'schedule definition
010:
011: PROFILE SERSEN_PORT BPS=38400
PROFILE SERSEN_PORT FLOW=NONE
PROFILE SERSEN_PORT MODE=RS485
012: 'schedule definition
013: RA("B:",ALARMS:OV:100KB,DATA:OV:1MB)15S LOGONA GA
014: 1SERIAL("%2d[200CV].%2d[201CV].%4d[202CV]%*1s%2d[203CV]:%2d[204CV]:%2d[205CV]%f[102CV]%f[103CV]%f[104CV]%f[105CV]%f[106CV]%f[107CV]%f[108CV]%f[109CV]%f[110CV]%f[111CV]%f[112CV]%f[113CV]%f[114CV]%f[115CV] ")
015: 200CV("Day")
016: 201CV("Month")
017: 202CV("Year")
018: 203CV("Hour")
019: 204CV("Minute")
020: 205CV("Second")
021: 102CV("Flags")
022: 103CV("Status")
023: 104CV("Product")
024: 105CV("Attenuation")
025: 106CV("Phase")
026: 107CV("Spread")
027: 108CV("Internal Temp")
028: 109CV("Current In 1")
029: 110CV("Current In 2")
030: 111CV("PT100 Temp")
031: 112CV("Conc 1 Live")
032: 113CV("Conc 1 Avg")
033: 114CV("Conc 2 Live")
034: 115CV("Conc 2 Avg")
035: END
'end of program file

Hi Rudy, Thanks very much for your assistance with this. :laugh: I think I had most of it correct, except I wasn't parsing the date/time as individuals entries, just trying as one large chunk. I have written the program like you said, but I am getting a "Serial sensor receive timeout at control string position 11" error. 'JOB=JOB1 'COMPILED=2014/11/12 09:12:35 'TYPE=dt80 DT=\d 001: BEGIN"JOB1" 002: CATTN 003: 'Spans and polynomial declarations 004: 'Thermistor declarations 005: 'Switches declarations 006: 'Parameter declarations 007: 'Global declarations 008: RS1S 009: 'schedule definition 010: 011: PROFILE SERSEN_PORT BPS=38400 PROFILE SERSEN_PORT FLOW=NONE PROFILE SERSEN_PORT MODE=RS485 012: 'schedule definition 013: RA("B:",ALARMS:OV:100KB,DATA:OV:1MB)15S LOGONA GA 014: 1SERIAL("%2d[200CV].%2d[201CV].%4d[202CV]%*1s%2d[203CV]:%2d[204CV]:%2d[205CV]%f[102CV]%f[103CV]%f[104CV]%f[105CV]%f[106CV]%f[107CV]%f[108CV]%f[109CV]%f[110CV]%f[111CV]%f[112CV]%f[113CV]%f[114CV]%f[115CV] ") 015: 200CV("Day") 016: 201CV("Month") 017: 202CV("Year") 018: 203CV("Hour") 019: 204CV("Minute") 020: 205CV("Second") 021: 102CV("Flags") 022: 103CV("Status") 023: 104CV("Product") 024: 105CV("Attenuation") 025: 106CV("Phase") 026: 107CV("Spread") 027: 108CV("Internal Temp") 028: 109CV("Current In 1") 029: 110CV("Current In 2") 030: 111CV("PT100 Temp") 031: 112CV("Conc 1 Live") 032: 113CV("Conc 1 Avg") 033: 114CV("Conc 2 Live") 034: 115CV("Conc 2 Avg") 035: END 'end of program file

Hi Nick,

Please install DeTransfer into your PC then establish a connection to dataTaker using it.
Enable SERIAL diagnostic by sending P56=1 from SEND window.

When the logger tries to parse the incoming string, you will see the transcript process in RECEIVE window.
Send me that transcript.

Best regards,
Rudy Gunawan

Hi Nick, Please install DeTransfer into your PC then establish a connection to dataTaker using it. Enable SERIAL diagnostic by sending P56=1 from SEND window. When the logger tries to parse the incoming string, you will see the transcript process in RECEIVE window. Send me that transcript. Best regards, Rudy Gunawan

Connected via DeTransfer and sent the P56=1 command. Log as follows;

1SERIAL: RxBuf=0[]
1SERIAL: InputAction: "%2d[200CV]"
E,086910,2014/11/12,12:00:55,0.018310,89;"Serial sensor receive timeout at control string position 11";0103;547C
D,086910,"JOB1",2014/11/12,12:00:45,0.000488,0;A,0,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0094;0DFC

Connected via DeTransfer and sent the P56=1 command. Log as follows; 1SERIAL: RxBuf=0[] 1SERIAL: InputAction: "%2d[200CV]" E,086910,2014/11/12,12:00:55,0.018310,89;"Serial sensor receive timeout at control string position 11";0103;547C D,086910,"JOB1",2014/11/12,12:00:45,0.000488,0;A,0,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;0094;0DFC

Hi Nick,

DeLogger uses a fixed format mode for command console, when you use DeTransfer you should turn off fixed format mode for easiness of monitoring.
Please run \h\R\N\C\U prior issuing any command in DeTransfer.

Now back to those string.
This message 1SERIAL: RxBuf=0[] indicates there is no incoming message to dataTaker (from the sensor).

Please check both port setting and wiring.
And are you sure the sensor sends out a series of string continuously (to dataTaker) without any command to trigger it?

Best regards,
Rudy Gunawan

Hi Nick, DeLogger uses a fixed format mode for command console, when you use DeTransfer you should turn off fixed format mode for easiness of monitoring. Please run \h\R\N\C\U prior issuing any command in DeTransfer. Now back to those string. This message 1SERIAL: RxBuf=0[] indicates there is no incoming message to dataTaker (from the sensor). Please check both port setting and wiring. And are you sure the sensor sends out a series of string continuously (to dataTaker) without any command to trigger it? Best regards, Rudy Gunawan

Hi Rudy,

I have checked the wiring and also the port setting is correct as it states it in the the following attachment. (Taken directly from the hardware manual).

The only other information I have regarding the serial output is this:

5cb58d8dd5f21

It should simply be outputting data each second, with no commands required to be sent to the device. (Our other unit which is very similar also does not need any output commands).

I may try connecting using the RS-232 interface instead and see if any better results are yielded.

Hi Rudy, I have checked the wiring and also the port setting is correct as it states it in the the following attachment. (Taken directly from the hardware manual). The only other information I have regarding the serial output is this: ![5cb58d8dd5f21](serve/attachment&path=5cb58d8dd5f21) It should simply be outputting data each second, with no commands required to be sent to the device. (Our other unit which is very similar also does not need any output commands). I may try connecting using the RS-232 interface instead and see if any better results are yielded.

Hi Nick,

There should be no problem receiving those string using RS485 connection.
Please make sure you wire the sensor correctly as per attached:

5cb58fae10e61

Please run the following process through DeTransfer, set the switch setting back to default using double forward slash (//) before staring this process,
then enable SERIAL transparent mode SSDIRECT.

If dataTaker manage to get that string from the logger, you will see incoming string through RECEIVE window.
To close transparent mode send ENDSSDIRECT.

Can you tell me about this sensor so I can assist you better? (brand, type, model)

Best regards,
Rudy Gunawan

Hi Nick, There should be no problem receiving those string using RS485 connection. Please make sure you wire the sensor correctly as per attached: ![5cb58fae10e61](serve/attachment&path=5cb58fae10e61) Please run the following process through DeTransfer, set the switch setting back to default using double forward slash (//) before staring this process, then enable SERIAL transparent mode SSDIRECT. If dataTaker manage to get that string from the logger, you will see incoming string through RECEIVE window. To close transparent mode send ENDSSDIRECT. Can you tell me about this sensor so I can assist you better? (brand, type, model) Best regards, Rudy Gunawan

Hi Rudy,

I have checked wiring and connections and now have also tried to communicate with the device using RS232 through the serial sensor port, still no luck.

I am starting to think the measurement unit may not be outputting data as expected?

I have hosted the scanned parts of the manual (only hard copy available) on our website so you can view it.
http://www.cleanprotech.com.au/PDF/BMA_DynFAS.pdf

I have made sure the output is set on "Row" data transfer, as stated in section 6.4 (the information I have posted on here earlier) as this outputs the data in this format we are interested in.

Hi Rudy, I have checked wiring and connections and now have also tried to communicate with the device using RS232 through the serial sensor port, still no luck. I am starting to think the measurement unit may not be outputting data as expected? I have hosted the scanned parts of the manual (only hard copy available) on our website so you can view it. http://www.cleanprotech.com.au/PDF/BMA_DynFAS.pdf I have made sure the output is set on "Row" data transfer, as stated in section 6.4 (the information I have posted on here earlier) as this outputs the data in this format we are interested in.

Hi Nick,

I saw in that manual section 2.2.29 which stated Data Printout.
Assuming this menu of Data Printout must be selected prior sending out data then the sensor may need a trigger.
In that case, you may need tap two ways communication between PC and DynFas Microwave to check the trigger string (use SERIAL port monitor software).

It is recommended to check the string transaction from the sensor to understand the process flow using direct connection to a PC (use hyperterminal).
Then replicate the process in dataTaker.

Best regards,
Rudy Gunawan

Hi Nick, I saw in that manual section 2.2.29 which stated Data Printout. Assuming this menu of Data Printout must be selected prior sending out data then the sensor may need a trigger. In that case, you may need tap two ways communication between PC and DynFas Microwave to check the trigger string (use SERIAL port monitor software). It is recommended to check the string transaction from the sensor to understand the process flow using direct connection to a PC (use hyperterminal). Then replicate the process in dataTaker. Best regards, Rudy Gunawan

Yeah I saw that point also Rudy, but I think that the 'Data Printout' just outputs the device settings when asked to do so.

The RS485 and RS232 section still says data is outputted for every measurement sweep. I think that the serial output I'm after and the 'data printout' are completely separate.

Yeah I saw that point also Rudy, but I think that the 'Data Printout' just outputs the device settings when asked to do so. The RS485 and RS232 section still says data is outputted for every measurement sweep. I think that the serial output I'm after and the 'data printout' are completely separate.

Hi Nick,

Just my curiosity, does the sensor has its own data logger?
What is this DataLog?

My understanding on that line is all the recording process happen automatically inside the system.
Output as text file is possible though RS232 or RS485 but you need to press DataLog or Data Printout to trigger it.

I will contact you directly.

Best regards,
Rudy Gunawan

Hi Nick, Just my curiosity, does the sensor has its own data logger? What is this DataLog? My understanding on that line is all the recording process happen automatically inside the system. Output as text file is possible though RS232 or RS485 but you need to press DataLog or Data Printout to trigger it. I will contact you directly. Best regards, Rudy Gunawan
184
11
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft