Sign in to follow this  
Followers 0
justwhy2003

FX3G connection to modem

22 posts in this topic

Hi Im trying to connect a FX3G to my PC via a GPRS modem to enevtually connect to an OPC server. The modem is an INSYS device that has a Serial connection, this then connects to software in my computer via TCP/IP and presents the data on a virtual serial COM port for the connecting software to make interface with the PLC (as though it is connected direct on my desk). My question is to do with the cable connection between the PLC and modem. The 9 way D connector on the modem is female. I was planning to use my serial programming cable (with dongle) to connect to GX developer or a simple Citect program to check Im making communications. However it is also female to connect to the mle connection on my PC. I was planning to get a gender changer from RS to allow a connection but was wondering if there is a different cable used for PLC to modem connection than PLC to PC connection? I also have a USB connection on the FX but my USB/serial adapter requires drives in the connecting PC to work. Justin

Share this post


Link to post
Share on other sites
You will need a custom made cable between the SC-09 (red programming cable) and the modem. I don't remember the pinouts right now but I am sure I've got it at work and will send you tomorrow!

Share this post


Link to post
Share on other sites
Need a standard modem (straight) cable, the same name a COM-port extension cable, which can be purchased at any computer shop, and it is worth pennies.

Share this post


Link to post
Share on other sites
No, he will need a crossover cable since the SC-09 is connected to a PC COM port (which switch pin 2/3, 4/6, 7/8) while he is connecting to a modem which uses a straigt setup. Therefore, to be able to connect the SC-09 to the modem he will need to have a crossover cable!!

Share this post


Link to post
Share on other sites
Dear Kaare, Do not you think that the solution with SC09 is obtained expensive and ugly, if is much easier to use two direct-modem cables? Ie all that necessary is to buy FX3G-232BD and two modem cables. And further, to install the RS232-communication board on the PLC and connect it via modem cable with a modem, a second modem cable to connect the modem on PC side with PC. The price of issue will not exceed 60 USD. If the topicstarter wish to solder the cable, then will be entirely wise to solder a complete cable with RS232-RS422 converter or adapt the cable proposed by Sergey Troizky.

Share this post


Link to post
Share on other sites
If you wish to use a SC-09 between your modem and FX3 PLC then you will need a cable with the following pinout: 2-3 3-2 5-5 7-8 8-7 Or you can go with some of the other suggestions by Inntele if you wish.

Share this post


Link to post
Share on other sites
Thanks for the info. So I have 2 options: 1 - Use my existing programming cable with an adapter added between it and the modem. I dont have an SC-09 cable. I use an older cable including dongle (FX 20P-CADP). I presume this type of encryption isnt really used any more esp since USB cables for programming are becomming more popular. Im hoping I can use this cable in place of the SC-09 you describe... 2 - Use a straight modem cable. I think I even have a few of these lying around but I will need to purchase a FX3G-232BD. You then go on to speak about using 2 cables... Is one at the receiving PC side? On my PC side I shouldnt have any additional cables as the information is fed straight to a software via TCP port directing and presented as a virtual COM port.

Share this post


Link to post
Share on other sites
Yes, I'm pretty sure you can use the FX 20P-CADP together with the custom cable I provided, or with an existing crossed cable. Neither the FX 20P-CADP or the SC-09 contains any kind of encryption, they are simply RS232->RS422 converters.

Share this post


Link to post
Share on other sites
FX-20P-CADP is simply a 25-pin to 8 pin changer. It does NOT have the RS232 to RS422 converter electronics in it. It won't help you. It is the second piece of the SC09 cable if you already have an SC05.

Share this post


Link to post
Share on other sites
So SC05 is used for older A Series units (ive used the dongled part only of my cable for this in the past). The FX-20P-CADP is an addition to the SC05 and the 2 together make the SC09..? Im going to order an FX3G-232BD and try to connect with a modem cable.

Share this post


Link to post
Share on other sites
Yes, SC05 is the A Series programming cable, 9 pin RS232 PC end and 25-pin RS422 PLC end. FX-20P-CADP is simply a converter from the 25-pin to the 8 pin round. There are no electronics in it to convert RS232 to RS422. These two pieces together make up the SC09 cable. SC09 has a string tie between the two to keep them together. I have used FX-232CAB-1 for connection from 232BD to a PC before.

Share this post


Link to post
Share on other sites
OK, think Im making some progress here. I have got a FX3G-232BD and connected it into my FX3G (was waiting on the part hence the delay). I then connected what I thought was a modem cable between the FX3G and the modem. My GX developer is directed to the virtual com port set up by the receiving software. In GX communication settings I increased the time out value to allow for transmission via the GPRS and hit test. There was no communications but the RX/TX light on my modem flashed a few times so there is some sort of communication going on there. Upon testing the cable it is just straight through connections i.e. 1 - 1, 2 - 2 etc. So now I need a modem cable. I presume these should be fairly easy to get hold of...? I took a look on a few internet cable sites but again they seem to be female to female where I need male to female. Is there a difference in a modem cable and a Null modem cable? If I had the pin out for the cable required, i could make it up myself. Justin

Share this post


Link to post
Share on other sites
Suitable an extension cable of the COM-port (for mouse connecting), an example Gembird CC-133-6. The schematic of modem cable is attached.

Share this post


Link to post
Share on other sites
I got a modem cable from the manufacturer of the modem. It is as shown in Inntele's diagram. I have tried different transmission speeds for the RS232C interface with GX Developer but am still getting 'The data which was downloaded from the PLC is incorrect'.....etc. error. The RX/TX lights at the modem and 232-BD connection are flashing so there is at least some communications via the GPRS. Should the GX developer be able to recognise data coming via the modem cable in this fashion? I have seen another example where the RX and TX pins are crossed over, im going to try that. Is there anywhere I can look to see the underlaying information that determines what type of cable is required for PLC - Modem, PLC - PC for future reference...?

Share this post


Link to post
Share on other sites
Do not touch the cable, it has nothing to do with it. There are possible two problem, it could be a problem with setup of RS232-interface of PLC or with delay in the communication channel. The first could be identified by direct connection between PC & PLC via RS232-board, a null-modem (cross-) cable must be used for this purpose.

Share this post


Link to post
Share on other sites
I made up a null-modem cable and crossed pins 2 and 3, this connects to GX Dev directly with no problems. The problem seem like it is with the communication speeds...? I cant set the Transmission speed below 9.6Kbps on the Transfer setup, is there any way around this?

Share this post


Link to post
Share on other sites
The Programming Tool Protocol, which now you use for the connection with PLC, is critical for a delay time. With this protocol is impossible to set the communication speed below than 9600 kbit/s. The communication don't work even at low baudrate when total throughput of communication channel below than 5 kbit/s at the application level. And if you have positive results with local link and negative results with remote link so you can not use ProgToolProt for connection with PLC. You should use Computer Link Protocol for connection between OPC and PLC. This protocol demands setup of RS232-BD accordingly. Edited by Inntele

Share this post


Link to post
Share on other sites
When you talk about the Programming tool protocol I presume you are referring to 'Online -> Transfer Setup'. Yes in here the baud rate cannot go below 9.6kB. So then my other option is to use the computer link in the 'Parameter -> PLC Paramater -> PLC System 2'. If I use this option, I think I need to use a different cable to connect the 232-BD to my PC and again a different cable to connect the PLC to my modem...? Further to this... I made the cable up from the communication manual for connecting the 232 BD to a PC via computer link mode. It connects to GX Developer via this at 9.6 kB/s. I also interfaced it with a Citect program. Im planning to lower the baud rate and use Citect to test the operation. When I lower the Baud rate to 1200 kB/s i dont have comms any more with Citect. Even after i change the settings in PLC system (2) back to 9600, upload and power cycle it wont re-connect on RS232 even to GX (im programming these changes via USB and testing on RS232). Am I missing something obvious...? Edited by justwhy2003

Share this post


Link to post
Share on other sites
Independently on protocol, you should use different cabels if you connect PLC to PC or PLC to modem. This's because both PLC and PC are DTE (Data Terminal Equipment) and always equiped with DB9M connector, in contrary of modem that is DCE (Data Communication Equipment) and is always equiped with DB9F connector. In case of DTE-DTE connection a null-modem cable is being used, in case of DTE-DCE connection a modem cable is being used. When you use 'Parameter -> PLC Parameter -> PLC System 2' for 232-BD setup, check an 'Operate Communication Settings' box in this window, then download parameters into PLC and restart it, you'll can not link PC with PLC via ProgToolProt (GX Developer). This is because that box-checking fixes communication settings made in this port setup window. For communication with GX Developer the box must be unchecked, then PLC parameters should be downloaded and PLC restarted again. It is described in FX Communication Manual, which you need to read.

Share this post


Link to post
Share on other sites
Ok thank you. I was referring to the communications manual but I took it step by step through the 'Programming Communication' section and can now switch on and off this communication as required via a FX-232CAB-1 cable. I also used that communication to interface with Citect as a further test using the MELSFX2N driver. As discussed earlier I would now like to try and communicate with Citect using Baud rates lower that 9.6K. I have went through the 'Computer Link' section in the communication manual and made up the cable for RS232 on page 253. I set the communications as required in the PLC System (2) including ticking the 'Operate Communication Settings' box , downloaded and restarted the PLC. I dont seem to be making communications with Citect. Before I start trying different configurations etc, should I be using a different driver than MELSFX2N in Citect for Computer Link?

Share this post


Link to post
Share on other sites
Hi justwhy2003, First, I would like to say that was not necessary to solder the cable shown on page 253, because FX-232CAB-1, which you have, is a complete null-modem cable and it is suitable for any DTE-DTE connection by any scheme. Also should remember that connection between PLC and PC via modems is described in 'Remote Maintaince' Section of the manual. I suggest the following algorithm for adjustment of connection PC-PLC via modems: Step 1. Checking a direct connection between PC and PLC. a. To connect PLC and PC with GX Developer software via SC09 programming cable . b. To set parameters in PLC System (2) window for computer link protocol with according to serial setup in Citect Scada. Download the PLC parameters into PLC and reboot it by power off/on. c. To connect PLC and PC with Citect Scada software via FX-232CAB-1 and FX3G-232-BD. If they can not communicate properly with each other, go again to the item a) of this step. If it works good, go to Step 2. Step 2. Checking a connection between PC and PLC via modems. a. To put both modems nearly with each other (on the same table) and setup RS232 port of modems according to Citect/PLC serial setup you tested. b.To wire one modem to the PLC via modem cable and FX3G-232-BD, and the second modem to PC. c. To connect PLC and PC with Citect Scada via modems. If they can not communicate properly with each other, go again to the item a) of this step. If it work good, go to Step 3. Step 3. Checking PLC programming capabilities for modem connection. a. Connect PLC and PC with GX Developer software via SC09 cable. b. To set off the 'Operate Communication Settings' box in PLC System (2) window. Download the PLC parameters into PLC and reboot it by power off/on. c. To connect PLC and PC with GX Developer software via existing modem connection. If they can not communicate properly with each other you should seach a problem with setup in GX Developer 'Transfer Online' window, and repeat this item again. If it works good is possible to talk about further steps. Edited by Inntele

Share this post


Link to post
Share on other sites
I wasnt making much progress so I left it for a few weeks and though about things. When I returned to the project yesterday I made communications in about 15 minutes :) I think I was very close before but communications were being upset by a USB/serial converter so I used an older laptop with standard built in RS232 port. I followed Inntele's steps, made communications straight between PLC and Citect using FX232-CAB-1 cable and FX3G-232-BD and computer link ,and can do this at speeds below the 9600 available with the programming tool protocol. I then connected the 232 BD port to the modem using a null modem cable and the receiving virtual comms port to Citect. Again I have tried this at different baud rates (it seems the faster the rate the better the comms). I now have comms between the PLC and Citect via GPRS. However what I am receiving at my Citect screen isnt very stable. As a test I made a lamp based on M0 on the screen and a number based on a register. I put a value of 40 in the register and set M0. On the Citect screen the lamp flashes and the value changes from 0 to 1 and only sometimes to 40. I will make a new topicin the HMI/SCADA section but think I am getting close to where I need to be, and this is something relatively simple to do with update rates in the CItect setup. Thanks for your help so far. Justin

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