I have looked at the code in IPAC's tyGsOctal.c VxWorks driver and cross-referenced the bit-rate register settings with the UART data-sheet and I don't see why the 1200 baud rate shouldn't work. The only difference
is the 1 byte value written to one register. The corruption may have something do with noise on the data line, say a few spikes that just happen to fall at the same time as some of the data bits at that specific baud rate.
If I were investigating in detail I might try some different data patterns to see whether the data corruption is a fixed pattern or is somehow related to the data being sent out — a series of spaces and/or
'@' signs would only have one bit set in each byte. This might need a scope on the data line to look at properly though.
- Andrew
Complexity comes for free, Simplicity you have to work for.
From:
Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Mark Rivers via Tech-talk <tech-talk at aps.anl.gov>
Date: Thursday, November 2, 2023 at 4:43 PM
To: Goetze, Kurt <goetze at anl.gov>, Mrinal Bera <mrinalkb at uchicago.edu>
Cc: Tech-talk <tech-talk at aps.anl.gov>
Subject: RE: Cannot do successful RS-232 communication with baud rates <2400 with VME and IP module
I tested with my VxWorks system in the sector 13 electronics lab today. I reproduced the behavior Mrinal is seeing. This is all different hardware from Mrinal’s.
I put a loopback from pin 2 to 3 and used the asyn record to send a string and read the response. It works fine with the following baud rates:
2400
4800
9600
19200
38400
300, 600, and above 38400 report that the baud rate is not supported on the VxWorks console.
1200 does not report that it is unsupported, but the readback is incorrect, it does not match the output.
If 1200 was previously working at APS beamlines then we need to figure out if there was a change to the driver that broke it.
Mark
From: Tech-talk <tech-talk-bounces at aps.anl.gov>
On Behalf Of Goetze, Kurt via Tech-talk
Sent: Monday, October 30, 2023 5:21 PM
To: Mrinal Bera <mrinalkb at uchicago.edu>
Cc: Tech-talk <tech-talk at aps.anl.gov>
Subject: RE: Cannot do successful RS-232 communication with baud rates <2400 with VME and IP module
Hi Mrinal,
Mark Rivers made the suggestion to change the settings. Which is a good suggestion of course. To that I would add, for me, the next thing I would do is get on the port and sniff the traffic.
Let’s go off-line (off tech-talk) for now, you can bring me your boards and I can test them if you want.
Kurt
Hi Kurt,
Although the RS-232 settings for Lakeshore 330 are (Baud rate:1200bps, Parity: Odd, Stop bits:1, Data bits: 7), I tried to test the loopback with your suggestions (data bits: 8, parity: none), and got different
input/outputs for 1200 baud rate as shown in the attached image. With 2400 and above baud rates the input/output values are the same as expected.
The IP-Octal modules I am trying to set are old modules from SBS. We have ordered some new ones (IP-520) from Acromag, but I haven’t yet received them. We will look into the Moxa option as well.
ioc3idb in sec.3 is running a LakeShore330 at 1200 baud, using the VME/IP-Octal.
Mostly these days we use Moxa “device servers” to run RS232 ports, I see some examples of the LakeShore330 being run this way here.
Just as a longshot, what company built your IP-Octal-232 modules? Did these come from the old supplier (SBS?), or did they come from an “Artisan” type company that does re-pops of legacy hardware? If the
latter, I would be suspicious.
IIRC we actually moved away from the IP-Octal-232 in favor of an Acromag (IP520?) board, towards the end of our VME era. These days much prefer a Moxa.
I checked the setup with two IP-Octal-232 modules, and they both showed similar behavior. I have been using Lakeshore so far but with soft IOC using on a Raspberry Pi computer. This is the first time I am
trying to interface it through VME and the IP-232 module. Can you tell me which beamline at APS is using Lakeshore through VME?
Your loopback test results suggest a hardware problem to me. Have you tried the test using a different (or new) IP-Octal-232 card? Also, I would send more and different characters, to see if any patterns
or other failure modes emerge.
LakeShore 330’s have been used here at the APS, at 1200 kbps, from what I can tell searching through ioc setup files.
Hello,
While configuring RS-232 communication through XM-octal breakout boards with TVME-200 (with IP-Octal serial module) and MVME3100 using EPICS 7.0 and vxWorks-6.9.4, I did some quick tests with asynRecord. I found the following:
1) With loopback communication(when I sorted the 2 and 3 terminals of the RS-232 ports) with the baud rates of 2400 and above, I received the same input and output values (as shown in the 1st attached image). That shows that RS-232 communication is OK.
2) With the baud rate of 1200, the Output and Input values of asyRecord are different (as shown in the 2nd attached image). I suspect either the tyGSModule or TVME-200 with IP-Octal Serial board has some issue with communication baud rates below 2400.
When I checked the IP-Octal Serial module documentation I found the baud rate information as ‘Programmable in 18 steps to 34.8kbps’. I dug further into the information regarding the baud rate of the chip used in the module (i.e SCC2698B). I found that the chip
supports 26 fixed baud rates from 50 to 38.4kbps. Hence, I think 1200 kbps should be supported by the chip and IP-Octal Serial module.
I need the baud rate of 1200kbps to interface the Lakeshore 330 temperature controller with EPICS on VME hardware. Did anybody try to interface Lakeshore 330 with VME and IP modules?
Best regards,
Mrinal
|