Legacy Hardware and Apps
Urgent help with serial communication

I have an Applied Physics 543 orientation sensor connected to my DT800 serial channel. I followed the RS232 wiring scheme (p167 of 240 from the manual).

The manual for the sensor can be found here: http://www.appliedphysics.com/543_M.html.

I've tested the sensor by connecting it to my laptop's serial port and running a terminal program to communicate with it. In the terminal program, I issued the following commands to get the sensor running:

Note:

= carriage return, comments follow the '
. * 'resets the sensor 
M=T 'changes sensor to text mode 
M=A 'sets sensor to angle mode, too 
M=E 'enable checksum data 
A 'sets sensor to send data automatically

The code above gets the sensor to return the readings every 500 millisecond. I see the outputs in my terminal program. The output looks like this:

350.33 89.223 22.34 +1.00000 +0.5555 7A

All but the last value (7A) are considered floating points. 7A is treated as a hexadecimal. In order to mimic, the above code in the DT800. I implemented the following code in DeLogger:

PS=9600,N,8,1,HWFC 'Sets the port comm specs. 
1SSPWR=1    'Turns serial port POWER (1=ON/0=Off) 
1SERIAL(RS232,"{*\013}\w[1000]") 
1SERIAL(RS232,"{M=\013}\w[1000]}") 
1SERIAL(RS232,"{M=A\013\w[1000]}") 
1SERIAL(RS232,"{M=E\013\w[1000]}") 
1SERIAL(RS232,"{A\013}\w[1000]") 

BEGIN"Crossbow" 
'Parameter declarations P31=3 
'Set Date and Time format 
RG1SERIAL"\013" LOGONG GG 
'Wait for the to trigger schedule G and log the data 
'Begin actual report section 

1SERIAL(RS232,"%f[101CV] %f[102CV] %f[103CV] %f[104CV] %f[105CV] %x[106CV]^M") 
1SERIAL(RS232,"\e")    
'Empty the buffer to prepare for next transmission 
'Begin actual report section 
101CV("Roll",FF0) 
102CV("Pitch",FF0) 
103CV("Yaw",FF0) 
104CV("TGF",FF0) 
105CV("TMF",FF0) 
106CV("CHK",FF0) 
END 
'end of program file

The problem is that when I try to transmit the data the DT800 becomes stuck. The only light that stays on is the charging light. All the other lights are off.

The only way I can get it back to normal state is by using a paper clip to hard reset the DT800 via the small hole next to the serial port. When I got it out of the stuck state, I re-check the status of the DT800, and I see that it currently doesn't have any jobs running.

So I decided to send the code line by line. I noticed that it gets stuck after I send this line:

1SERIAL(RS232,"{*\013}\w[1000]")

I cannot figure out why. Can you please help me? This is very urgent because we are using this unit for a test in Alaska right now.

Thanks! Also, we've recently sent this unit for a routine checkup to Computer Aided Solutions (not sure about the name), and they said that everything was fine.

Thanks again!

I have an Applied Physics 543 orientation sensor connected to my DT800 serial channel. I followed the RS232 wiring scheme (p167 of 240 from the manual). The manual for the sensor can be found here: http://www.appliedphysics.com/543_M.html. I've tested the sensor by connecting it to my laptop's serial port and running a terminal program to communicate with it. In the terminal program, I issued the following commands to get the sensor running: Note: ```` = carriage return, comments follow the ' . * 'resets the sensor M=T 'changes sensor to text mode M=A 'sets sensor to angle mode, too M=E 'enable checksum data A 'sets sensor to send data automatically ```` The code above gets the sensor to return the readings every 500 millisecond. I see the outputs in my terminal program. The output looks like this: ```` 350.33 89.223 22.34 +1.00000 +0.5555 7A ```` All but the last value (7A) are considered floating points. 7A is treated as a hexadecimal. In order to mimic, the above code in the DT800. I implemented the following code in DeLogger: ```` PS=9600,N,8,1,HWFC 'Sets the port comm specs. 1SSPWR=1 'Turns serial port POWER (1=ON/0=Off) 1SERIAL(RS232,"{*\013}\w[1000]") 1SERIAL(RS232,"{M=\013}\w[1000]}") 1SERIAL(RS232,"{M=A\013\w[1000]}") 1SERIAL(RS232,"{M=E\013\w[1000]}") 1SERIAL(RS232,"{A\013}\w[1000]") BEGIN"Crossbow" 'Parameter declarations P31=3 'Set Date and Time format RG1SERIAL"\013" LOGONG GG 'Wait for the to trigger schedule G and log the data 'Begin actual report section 1SERIAL(RS232,"%f[101CV] %f[102CV] %f[103CV] %f[104CV] %f[105CV] %x[106CV]^M") 1SERIAL(RS232,"\e") 'Empty the buffer to prepare for next transmission 'Begin actual report section 101CV("Roll",FF0) 102CV("Pitch",FF0) 103CV("Yaw",FF0) 104CV("TGF",FF0) 105CV("TMF",FF0) 106CV("CHK",FF0) END 'end of program file ```` The problem is that when I try to transmit the data the DT800 becomes stuck. The only light that stays on is the charging light. All the other lights are off. The only way I can get it back to normal state is by using a paper clip to hard reset the DT800 via the small hole next to the serial port. When I got it out of the stuck state, I re-check the status of the DT800, and I see that it currently doesn't have any jobs running. So I decided to send the code line by line. I noticed that it gets stuck after I send this line: ```` 1SERIAL(RS232,"{*\013}\w[1000]") ```` I cannot figure out why. Can you please help me? This is very urgent because we are using this unit for a test in Alaska right now. Thanks! Also, we've recently sent this unit for a routine checkup to Computer Aided Solutions (not sure about the name), and they said that everything was fine. Thanks again!

Good morning Qacer,

By the looks of your code you are writing it with DeTransfer. In DeTransfer the \ command has a special meaning. It is a command to DeTransfer that what follows the\ is for DeTransfer For example the line T=\t tell DeTransfer to read the time form the computer (\t) and send it to the dataTaker.

When writing code that needs the \ to be sent to the dataTaker you need to have \. I would also put all commands between the begin and end statements.

Try this:

BEGIN"Crossbow"

PS=9600,N,8,1,HWFC 'Sets the port comm specs.
1SSPWR=1 'Turns serial port POWER (1=ON/0=Off)

1SERIAL(RS232,"{*\\013}\\w[1000]")
1SERIAL(RS232,"{M=\\013}\\w[1000]}")
1SERIAL(RS232,"{M=A\\013\\w[1000]}")
1SERIAL(RS232,"{M=E\\013\\w[1000]}")
1SERIAL(RS232,"{A\\013}\\w[1000]")
1SERIAL(RS232,"\\e") 'Empty the buffer to prepare for next transmission
'Parameter declarations
P31=3 'Set Date and Time format

RG1SERIAL"\\013" LOGONG GG
'Wait for the to trigger schedule G and log the data

'Begin actual report section
1SERIAL(RS232,"%f[101CV] %f[102CV] %f[103CV] %f[104CV] %f[105CV] %x[106CV]^M")
1SERIAL(RS232,"\\e") 'Empty the buffer to prepare for next transmission

'Begin actual report section
101CV("Roll",FF0) 
102CV("Pitch",FF0) 
103CV("Yaw",FF0) 
104CV("TGF",FF0) 
105CV("TMF",FF0) 
106CV("CHK",FF0)

END

Cheers,
Roger

Good morning Qacer, By the looks of your code you are writing it with DeTransfer. In DeTransfer the \ command has a special meaning. It is a command to DeTransfer that what follows the\ is for DeTransfer For example the line T=\t tell DeTransfer to read the time form the computer (\t) and send it to the dataTaker. When writing code that needs the \ to be sent to the dataTaker you need to have \\. I would also put all commands between the begin and end statements. Try this: ```` BEGIN"Crossbow" PS=9600,N,8,1,HWFC 'Sets the port comm specs. 1SSPWR=1 'Turns serial port POWER (1=ON/0=Off) 1SERIAL(RS232,"{*\\013}\\w[1000]") 1SERIAL(RS232,"{M=\\013}\\w[1000]}") 1SERIAL(RS232,"{M=A\\013\\w[1000]}") 1SERIAL(RS232,"{M=E\\013\\w[1000]}") 1SERIAL(RS232,"{A\\013}\\w[1000]") 1SERIAL(RS232,"\\e") 'Empty the buffer to prepare for next transmission 'Parameter declarations P31=3 'Set Date and Time format RG1SERIAL"\\013" LOGONG GG 'Wait for the to trigger schedule G and log the data 'Begin actual report section 1SERIAL(RS232,"%f[101CV] %f[102CV] %f[103CV] %f[104CV] %f[105CV] %x[106CV]^M") 1SERIAL(RS232,"\\e") 'Empty the buffer to prepare for next transmission 'Begin actual report section 101CV("Roll",FF0) 102CV("Pitch",FF0) 103CV("Yaw",FF0) 104CV("TGF",FF0) 105CV("TMF",FF0) 106CV("CHK",FF0) END ```` Cheers, Roger

Hi Roger,

Thanks! I could've sworn the manual said that I need to use one \ for DeLogger and two \ for DeTransfer. Anyway, I figured out what was wrong. My version of DeLogger did not work well with v4.10 of the DT800 firmware. I upgraded to a new DeLogger version and it work.

The only problem now is that I have a cable issue. The program runs fine, but because of the issue the sensor data is not properly translated.

Do you have any recommendations on where I can get a shielded twisted pair cable for use in an RS232 in the DT800? The manual said that I should use a STP for all serial connections.

Thanks!

Hi Roger, Thanks! I could've sworn the manual said that I need to use one \ for DeLogger and two \ for DeTransfer. Anyway, I figured out what was wrong. My version of DeLogger did not work well with v4.10 of the DT800 firmware. I upgraded to a new DeLogger version and it work. The only problem now is that I have a cable issue. The program runs fine, but because of the issue the sensor data is not properly translated. Do you have any recommendations on where I can get a shielded twisted pair cable for use in an RS232 in the DT800? The manual said that I should use a STP for all serial connections. Thanks!

Good morning Qacer,

Shielded Twisted Pair is used to reduce noise. Any electrical or electronic supplier will carry it.

Cheers,
Roger

Good morning Qacer, Shielded Twisted Pair is used to reduce noise. Any electrical or electronic supplier will carry it. Cheers, Roger
18
3
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