Sign in to follow this  
Followers 0
BITS N BYTES

Serial Bluetooth interface

25 posts in this topic

Having a problem with the Mitsumi USB Bluetooth adapter connected to the Promi SD 202 Bluetooth to serial adapter. The PROMI SD is on the serial port of a CJ1M-CPU23 with the PLC dipswitch 5 ON. Going On-Line and Monitoring seems to work fine. On-line edits are OK if no comments are changed. BUT, but when I do a complete download of the program it takes about 10 minutes to complete!! AND, when I have changed comments during an On-Line edit it takes a long time for the change to complete!! In looking at the activity of the Bluetooth Serial port in My Bluetooth Places it seems that download activity is sporadic. Sits there with no activity then suddenly a burst of data and then stops again and waits for about a minute until another burst of activity. Eventually the download is complete. Is there a setting for the Promi SD that needs to be modified to increase/improve data throughput. There is NO explanation in the setup instructions describing exactly what the "Security Option" check boxes will change. Currently I have "Authentication", "Encrpytion" and "Signal" "ON" checked as suggested in the OMRON setup instructions. Do these settings affect data transfer rates?? The Promi SD is set up for a Baud Rate setting of 57600. Do I need to make changes in the PLC setup to attain this higher data transfer rate?? "Change PLC Settings" in CX-Programmer project is currently set for "Toolbus", 57600 Baud and "Auto Baud Rate Detect". Should I uncheck "Auto Baud Rate Detect" and fix the speed at 57600 baud? Do I need to force the settings for the Serial Port using the "STUP(237) - Change Serial Port Setup" instruction?? Trying to improve data throughput!! Have tried many different combinations of settings but none seem to work any better/faster !! ANY IDEAS??

Share this post


Link to post
Share on other sites
Check this post, it might be your problem.

Share this post


Link to post
Share on other sites
Hi PdL, I had read that post already. It refers to an issue using the PLC Peripheral Port with DIPSWITCH 4 when turned OFF. Won't connect AT ALL at 57,600 baud. I am using the Serial Port with DIPSWITCH 5 turned ON and connect with no problem at 57,600. It just appears that when using the Bluetooth Serial adapter that large amounts of data [complete download, comments edits] are buffered prior to actually transmitting. Just to be sure I will change the baud rate THNX

Share this post


Link to post
Share on other sites
Hi ! I have never done it before, but maybe this pdf file can help you. It is in french, but pictures can help you recognize what is going on. http://www.support-omron.fr/pdf/FT005.pdf

Share this post


Link to post
Share on other sites
THNX pszczepan. French language no problem. Seems that unselecting the AUTO BAUD RATE is a required part of the setup in the French document. I'll try that on Monday and see if it fixes the problem.

Share this post


Link to post
Share on other sites
Strangely enough I leave auto baud rate detect ticked and set the speed to 115kbaud and it works fine. Maybe it will be quicker with it unticked but it works pretty well for me as described.

Share this post


Link to post
Share on other sites
I believe it's the combination of auto baud rate and 57600 that gives the problem.

Share this post


Link to post
Share on other sites
B&B There is some inherent latency converting Bluetooth to serial. Some is in the driver, some is in the hardware. Bumping up to 115,200 can give you the best serial throughput, but obviously will not increase the Bluetooth throughput. I typically refer to 115,200 on the Bluetooth adapter as roughtly equivalent to 9600 using a cable. One thing that I have not tried, but may be worth trying, is to reduce the frame length in CX Server. This could reduce packet fragmentation on the converter. PMCR

Share this post


Link to post
Share on other sites
PMCR: I thought you had told me about lowering the frame rate...

Share this post


Link to post
Share on other sites
Hi PMCR, how exactly does one reduce the frame length in CX Server. To date I have never had to access/touch the CX Server application when using CX-Programmer, CX-Designer, CX-Protocol or CX-Position. Will altering the frame length have any NEGATIVE affect on any of these applications?? Edited by BITS N BYTES

Share this post


Link to post
Share on other sites
Some thoughts .... may not be relevant but anyway here goes ... I'd be surprised if the PROMI-SD has that much affect on your download rate., but I don't have the figures in front of me for the latency of the PROMI-SD driver and hardware. You could probably obtain those specs direct from the original manufacturers of the Promi-SD devices. In our tests last year with a pocket PC running bluetooth serial at 57600 bps communicating with a CJ1M with Promi-SD adapter we were able to download all 64K words of DM memory in under 60 seconds. That was with the verbose transfer method of FINS protocol encapsulated inside Hostlink protocol and with a "virgin" ("out of the box") CJ1M and using the serial (not peripheral) port. Toolbus protocol transmission is in binary not hex ASCII form and has minimal overhead in terms of headers/trailers so should be faster for you in practice that I achieved. I must state that I did, however, notice an increase in download time when I changed to another variant of CJ1M that had been previously used on a site. I wonder, therefore, whether there's a PLC setting that might be affecting this? I vaguely recall discussions last year with the agent on some settings in the CJ1M for improving background servicing of the serial port. There is one check you could do to isolate whether its actually a Bluetooth issue or a setting in the PLC or PC. In effect the Promi-SD and the remote Bluetooth adapter on the PC act like a virtual serial cable - the settings in the PLC and PC should be the same (other than the COM port setting in the PC software). What is the comparison in download times when you switch back to a standard serial cable? Stop-start transmission can be indicative of problems in not processing the receive buffer frequently enough or not filling the transmit buffer fast enough to sustain high transmission rates. A serial analyser placed on the serial port between the PLC and Promi-SD may be enlightening - i.e. the delay between the end of the message received by the PLC and how fast it starts responding, also the inter-character delay in the message transmissions from either end, whether message retransmission is occurring due to error or time-outs, etc. Eric

Share this post


Link to post
Share on other sites
Bits N Bytes You can change the max frame length of any media (serial, Ethernet, etc) on the tab in CXP, CXI, etc on the network tab (one tab to the left of Driver, where you select the serial port, baud, etc). It is called 'Frame Length', and is set to 1004 for a max by default. The downside to limiting this is that it has a negative effect on the max size of the online edit that you can do. Under normal circumstances (ie using a cable) it will tend to slow down communications, but for the wireless method, it could help.

Share this post


Link to post
Share on other sites
Adjusting the frame length is also necessary when connecting through routed networks. You then have to set the frame length to the maximum of the network type that is the "slowest". For instance once I was having trouble connecting to a CJ1M in a Controller Link network which was routed to a Ethernet network. I had to reduce the frame length in CX-Programmer to 512 which I believe is maximum for CLK before I could do succesful monitoring and online edits. Before that I could connect, but I kept getting strange messages that the CPU memory was read only etc I could get online, but all values appeared as error and I could not see ladder status. Later it turned out the frame length was causing the problem. Bit OT but perhaps useful info.

Share this post


Link to post
Share on other sites
I must admit I have never been hooked in through several networks before but just on Controller Link I always run with full default frame rate without any problem. Recently hooked in to 4 Promi's at default frame rate. Also had Controller Link between 2 PLCs so only needed the one Promi to access both. Monitoring and cahnging 5 PLCs online with Bluetooth/Controller link at once at default frame rates without any problems whatsoever. Bit puzzled by all of this. By the way, the PLCs were all V3 CJ1M-CPU12.

Share this post


Link to post
Share on other sites
Well I am a bit puzzled also!! Today's update. 1. Reconfigured PROMI-SD at 115200 and connect to Serial port of CJ1M-CPU23 V4 with dipswitch 5 ON. Authentication, Encryption and Signal ON all checked. Perform complete download. 2. Reconfigure PLC settings for serial port to Toolbus at 115200 set dipswitch 5 OFF. Perform complete download with AutoBaud ON 3. Perform complete download with AutoBaud OFF 4. Changed PROMI-SD settings to uncheck Authentication, Encryption. Signal OFF checked. Perform complete download with AutoBaud OFF. In cases 1 thru 3 there is no noticeable difference in the overall download time, almost exactly the same at around 7-1/2 mnutes. Download included all programs, comments and symbols but NOT I/O settings. In case 4 the download time was appreciably higher at around 11-1/4 minutes. When monitoring activity on the Bluetooth Serial port and CX-Server Performance Monitor they both show sporadic activity whilr performing a program download [as described in my original post]. When monitoring activity on the Bluetooth Serial port and CX-Server Performance Monitor while Monitoring on-line and/or On-line Editing, activity is almosy constantly on. Will try the frame rate adjustment suggested by PMCR tomorrow and post reults.

Share this post


Link to post
Share on other sites
What is the download time with a normal serial connection?

Share this post


Link to post
Share on other sites
Bits N Bytes I have just posted a utility that will read 200 DMs 100 times and show the total time, and average time for reading. Go to the Download Code / Omron / Utilities to get the utility. This supports both Hostlink and Toolbus, but not the auto baud rate of Toolbus. Try this utility to take CX Server out of the equation. PMCR

Share this post


Link to post
Share on other sites
For what it's worth here is an update I have observed with Bluetooth communications:- Test 1. Complete Program download with cable to Peripheral Port with CX-Programer for Network Type set at 115200 and AutoBaud ON and FrameLength 1000. Time for download 25 seconds. Change to Bluetooth on Serial Port dipswitch 5 OFF. PLC Hostlink Port settings for this port is 115200, Toolbus. CX-Progammer setting for Network Type set at 115200 and AutoBaud OFF for remaining tests 2-4. Test 2. Set FrameLength at 1000. Complete Program download takes 10min 50sec. During download CX-Server Performance Monitor shows sporadic activity between 1-2%. Test 3. Set FrameLength at 500. Complete Program download takes 7min 02sec. During download CX-Server Performance Monitor shows sporadic activity between 1-2%. Test 4. Set FrameLength at 100. Complete Program download takes 3min 20sec. During download CX-Server Performance Monitor shows CONSTANT activity between 3-4%. Note that with FrameLength set too low OnLine editing will not work, so it appears necessary to change the FrameLength to around 500 for On-Line editing to work. Not sure what the threshold value should be for this? SUMMARY For complete program download thru Bluetooth set the FrameLength to 100. Once the download is complete change FrameLength back to 500 to allow On-Line editing. When I have the chance I will try the Utility posted By PMCR.

Share this post


Link to post
Share on other sites
I am still puzzled about this. Will experiment with a CPU when I get a chance.

Share this post


Link to post
Share on other sites
this may sound wierd but i would decrease the frame rate in in the order of 2^ ie 512, 128, 1024, 2048 etc. I would generraly decrease the fram rate when connecting through modems also to 512, and the same as pdl going through multiple network layers

Share this post


Link to post
Share on other sites
OK! First chance to get online yesterday for a while. Hooked up to a CJ1M-CPU12 via the peripheral port. Placed PLC in program mode. Generated I/O table. Went to serial port settings and set to toolbus 115kbaud. Downloaded setup to PLC.Turned back into monitor mode. Plugged in Promi and bluetooth dongle. Established communications with Promi. Went into CPU settings and set to com6 - first Promi device - ticked auto baud rate detect at 115kbaud - connected to PLC. No problem at all. Did not change DIP switches or anything. I just worked.

Share this post


Link to post
Share on other sites
Hi Old Phaart, the original problem I mentioned was not the inability to connect with Bluetooth, but rather the long time it took to download a complete program to the processor. Have you tried this? If so then how long did it take and what were the framelength settings in the PLC Network Settings?? From another Old Phaarrtt! Edited by BITS N BYTES

Share this post


Link to post
Share on other sites
I have not got that far yet - will convert a 19k proram from a C200H and try that next week and let you know how I go.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0