Sign in to follow this  
Followers 0
Sharkie

Need to send ASCII code via com port

7 posts in this topic

I'm using an FX2 plc and need to communicate with a Hipot tester via PC. What it comes down to is in order to fully automate my system I need to send a 'control T' to the PC. I planed on getting a rs232 to keyboard converter and sending the command through the com port. What I'm not sure about is what function do I use to send an ASCII statement over the com port. Any help would be appreciated. Thanks! Dan

Share this post


Link to post
Share on other sites
FX2 only has one serial port, and that's the programing port. You cannot send data from the code over that port. If you upgrade to an FX3U, you can add the FX3U-232-BD and send ASCII to a PC. The built-in port is not accessible from commands in the PLC.Additional ports can be accessed with RS or RS2 instructions.

Share this post


Link to post
Share on other sites
Does this work? FX2NC-232ADP RS232 serial communications module

Share this post


Link to post
Share on other sites
Thanks for the info. Rather then changing the PLC I'm going to use a keyboard wedge program. It will do what I need for this project, but I know in the future to get the FX3.

Share this post


Link to post
Share on other sites
Yes, that does work!

Share this post


Link to post
Share on other sites
Build your ascii code from Hex pairs, ascii tables are in the GX developer help menu i.e. 33= 3 in ascii. I'd guess you still going to need to send ascii to your wedge. You would need to send the following Hex string 636f6e74726f6c2054 = control T But be aware you need to put the character pair in the correct order in the data register which would look like this D0 - 6f63 d1 - 746e d2 - 6f74 etc as viewed in the monitor screen, always seems backwards to me. Where are you getting the wedge from I have an app I could use 1 with but could never find one.

Share this post


Link to post
Share on other sites
Thanks for your reply. Being that I only need the one command to start my test, I'm actually cheating a little. I found a 'wedge' or keyboard converter software (Bill Redirect) that will allow you to use the CTS or DSR points on the serial port to send a command to an open program. I am going to wire the CTS pins 7+8 to an output on the plc. Then in the software I will direct that 'switch' to press {CTRL}t to the Hipot software. Not the ideal way to go but I'm crunched for time and budget. I've used wedges before with other PLCs and had good results. If you search for keyboard wedge you should be able to find what you need. They are used for connecting measuring equipment, calipers, etc. to PCs so they are out there. I do plan on checking with my quality department to see if they have any extras.

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