Support Forums
switching COM port parameter

Hi,

we have 2 RS485 modules with different com-parameters.
In Detransfer (enter commandlines direct to DT80) the switching with ps= ... works fine.

If i progamming the DT80 with a job (tried in one and two schedules) the switching going wrong.

RA[0:*/1] 'Messe aller 1 Minuten

DO{PS=RS485,9600,N,7,2} 'Setze Schnittstellenparameter für Zerotronic-Sensor
1..23CV(W)=0 1SERIAL("\e{~~~~FF1D000000002C\013}%[~0123456789ABCDEF][2$]%1x[1CV]%1x[2CV]%1x[3CV]%1x[4CV]%1x[5CV]%1x[6CV]%1x[7CV]%1x[8CV]%1x[9CV]%1x[10CV]%1x[11CV]%1x[12CV]%1x[13CV]%1x[14CV]%b",W) 6..12CV(FF0)
20CV(ff0,"checksum1" )=1CV+2CV+3CV+4CV+5CV+6CV+7CV+8CV+9CV+10CV+11CV+12CV
21CV(ff0,"ckecksum2" )=14CV+16
13CV
22CV(ff4,"mrad;mm/m" )=(12CV1000/2^24+11CV1000/2^20+10CV1000/2^16+9CV1000/2^12+8CV*1000/2^8 )
23CV(ff4,"Neigung=~mrad;mm/m" )=(6CV>=1)?22cv-1000/2^4:22cv
DO{XB} 'Starte Register B - Schreibe zu EBLOXX

RBX
DO{PS=RS485,19200,8,e,1} 'Setze Schnittstellenparameter für EBLOXX-A9
1Serial("\e{$0BW00 %8.2f[23CV]\013\w[1000]}\e{$0BR00\013}" )
1#I("Neig ana=~mA",FF3)

G ' starte alle Reports
Logon 'speichere die Daten
END ' Ende des Programmes

Can anyone help me?

Hi, we have 2 RS485 modules with different com-parameters. In Detransfer (enter commandlines direct to DT80) the switching with ps= ... works fine. If i progamming the DT80 with a job (tried in one and two schedules) the switching going wrong. RA[0:*/1] 'Messe aller 1 Minuten DO{PS=RS485,9600,N,7,2} 'Setze Schnittstellenparameter für Zerotronic-Sensor 1..23CV(W)=0 1SERIAL("\\e{~~~~FF1D000000002C\\013}%[~0123456789ABCDEF][2$]%1x[1CV]%1x[2CV]%1x[3CV]%1x[4CV]%1x[5CV]%1x[6CV]%1x[7CV]%1x[8CV]%1x[9CV]%1x[10CV]%1x[11CV]%1x[12CV]%1x[13CV]%1x[14CV]%*b",W) 6..12CV(FF0) 20CV(ff0,"checksum1" )=1CV+2CV+3CV+4CV+5CV+6CV+7CV+8CV+9CV+10CV+11CV+12CV 21CV(ff0,"ckecksum2" )=14CV+16*13CV 22CV(ff4,"mrad;mm/m" )=(12CV*1000/2^24+11CV*1000/2^20+10CV*1000/2^16+9CV*1000/2^12+8CV*1000/2^8 ) 23CV(ff4,"Neigung=~mrad;mm/m" )=(6CV>=1)?22cv-1000/2^4:22cv DO{XB} 'Starte Register B - Schreibe zu EBLOXX RBX DO{PS=RS485,19200,8,e,1} 'Setze Schnittstellenparameter für EBLOXX-A9 1Serial("\\e{$0BW00 %8.2f[23CV]\\013\\w[1000]}\\e{$0BR00\\013}" ) 1#I("Neig ana=~mA",FF3) G ' starte alle Reports Logon 'speichere die Daten END ' Ende des Programmes Can anyone help me?

Hi Fork,

You can't switch the setting like that with two RS485 devices connected.
Any command for dataTaker will be passed to both sensors and because different port setting you may get incorrect response.

I have 2 questions:

  • Are those sensors addressable?
  • If addressable, is it possible to use a single port setting for both sensor?
  • If not addressable then you have to add a 12V DPDT relay to switch between sensor (either port setting can be set identical or not).

Best regards,
Rudy Gunawan

Hi Fork, You can't switch the setting like that with two RS485 devices connected. Any command for dataTaker will be passed to both sensors and because different port setting you may get incorrect response. I have 2 questions: - Are those sensors addressable? - If addressable, is it possible to use a single port setting for both sensor? - If not addressable then you have to add a 12V DPDT relay to switch between sensor (either port setting can be set identical or not). Best regards, Rudy Gunawan

Hi Rudy,

thanks for the response.

I have tested the flow with the two different sensor types connected and powered at the same time!!!! and it works correctly (very well), if i enter the commands step by step via the keyboard in detransfer!
Maybe the programmaticly switching of the comportparameters is to slow and I should integrate a waiting time.?
I have another Idea. I will work with a RS232/485 Converter on HPORT. I think this should work.

Hi Rudy, thanks for the response. I have tested the flow with the two different sensor types connected and powered at the same time!!!! and it works correctly (very well), if i enter the commands step by step via the keyboard in detransfer! Maybe the programmaticly switching of the comportparameters is to slow and I should integrate a waiting time.? I have another Idea. I will work with a RS232/485 Converter on HPORT. I think this should work.

Hi Fork,

If you can receive the correct response using DeTransfer then it could be a timing issue.
Please use a waiting time before serial string \w[1000] for 1 second waiting time.

RBX
DO{PS=RS485,19200,8,e,1} 'Setze Schnittstellenparameter für EBLOXX-A9
1Serial("\e\w[1000]{$0BW00 %8.2f[23CV]\013\w[1000]}\e{$0BR00\013}" )
1#I("Neig ana=~mA",FF3)

Best regards,
Rudy Gunawan

Hi Fork, If you can receive the correct response using DeTransfer then it could be a timing issue. Please use a waiting time before serial string \w[1000] for 1 second waiting time. RBX DO{PS=RS485,19200,8,e,1} 'Setze Schnittstellenparameter für EBLOXX-A9 1Serial("\\e\\w[1000]{$0BW00 %8.2f[23CV]\\013\\w[1000]}\\e{$0BR00\\013}" ) 1#I("Neig ana=~mA",FF3) Best regards, Rudy Gunawan

Hi Rudy,

I was in holiday.

The suggestion/ try with the wait option doesn't work. I will take a converter on the Host Port for the second communication way.

Fork

Hi Rudy, I was in holiday. The suggestion/ try with the wait option doesn't work. I will take a converter on the Host Port for the second communication way. Fork

Hi Fork,

Please try to disable enable serial port function, to manually reset the port configuration.

Best regards,
Rudy Gunawan

Hi Fork, Please try to disable enable serial port function, to manually reset the port configuration. Best regards, Rudy Gunawan
33
5
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