I need to get some signals from GPS sensor.
The NMEA_0183 controller was added, some tags created:
Latitude_deg (Data type:int 16)-reference RMC.05 ,
Latitude_age (Data type:float)-reference RMC.06 ,
Latitude_dir (Data type: string)-reference RMC.07
Corresponding analog numeric controlls were created on HMI screen and allocated to the tags.
The port Com1 (RS232) was configured for this communication.
Settings: 4800, None, 8, 1 (exactly as desktop Com1 output)
Port Com4 (RS422) was used for communication with the PLC Mitsubishi FX3U.
For testing the program "GPS Generator Pro" V4.02 from avangardo.com was downloaded and installed on my desktop computer, serial COM1 was used as an output. Unregistered it allows to create RMC messages and it worked OK, the messages were clearly seen on my old laptop's hyperterminal.
But, nothing about GPS was seen on the HMI screen.
Swap Rx and Tx in the communication cable did not help.
What could be wrong? How to test the NMEA_0183 controller?
regards, Waldemar
GPS application
Re: GPS application
Waldemar,
I just tested this same setup (including the GPS software you mentioned) and it worked just great. Have a look at my screen shots to see how I had mine setup. I am guessing that somewhere you have a baud-rate that is incorrect.
I just tested this same setup (including the GPS software you mentioned) and it worked just great. Have a look at my screen shots to see how I had mine setup. I am guessing that somewhere you have a baud-rate that is incorrect.
- Attachments
-
- iX_tags.png (129.26 KiB) Viewed 18511 times
-
- avangardo_serial.png (59.93 KiB) Viewed 18511 times
-
- iX_serial.png (117.56 KiB) Viewed 18511 times
Best Regards,
Beijer Electronics, Inc.
Skylar Walker | Applications Engineer
Beijer Electronics, Inc.
Skylar Walker | Applications Engineer
Re: GPS application
Thank You Skylar. You are right. It works now. But, how can I allow the future customer to choose communication settings (port, baudrate, parity...)?
Re: GPS application
Waldemar,
The built in drivers are meant to only be configured once. That way they just work with the PLC designed for, with little setup requirements at run-time. If the GPS devices you use all require different settings that can't be changed to match the HMI, I would recommend using a custom script to parse the data. That way you can give the end user as many configuration options as you would like.
Attached is a script to parse NMEA data that will help get you started.
The built in drivers are meant to only be configured once. That way they just work with the PLC designed for, with little setup requirements at run-time. If the GPS devices you use all require different settings that can't be changed to match the HMI, I would recommend using a custom script to parse the data. That way you can give the end user as many configuration options as you would like.
Attached is a script to parse NMEA data that will help get you started.
- Attachments
-
- SerialComScript.Script_.zip
- (1.26 KiB) Downloaded 942 times
Best Regards,
Beijer Electronics, Inc.
Skylar Walker | Applications Engineer
Beijer Electronics, Inc.
Skylar Walker | Applications Engineer
Re: GPS application
Thank You Skylar. I will try the script soon. Today I tried to get GPS signals using COM2 port (RS422). For this purposes an ABB RS232/RS422 adapter was used.
No success. Actually, the panel did not show a communication error message, when signals from the GPS generator were sent (a green LED on the adapter was blinking, communication error code was zero) and did show one, when the generator stopped sending sentences (because of demo version's restrictions), and the communication error code became equal 1. It means, that the panel received GPS signals, but something was wrong.
I used this adapter to send signals to the PLC and it worked fine.
To reset the communication error I had to power down and up the panel. Is there easier way to do it?
What is possible to do to find the reason?
No success. Actually, the panel did not show a communication error message, when signals from the GPS generator were sent (a green LED on the adapter was blinking, communication error code was zero) and did show one, when the generator stopped sending sentences (because of demo version's restrictions), and the communication error code became equal 1. It means, that the panel received GPS signals, but something was wrong.
I used this adapter to send signals to the PLC and it worked fine.
To reset the communication error I had to power down and up the panel. Is there easier way to do it?
What is possible to do to find the reason?
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: GPS application
Waldemar,
Can you check to make sure that the RS422 output of the ABB RS232/RS422 adapter matches this pin out diagram.
Also, verify that the port on the panel is set to the proper protocol. That can be changed via the 'System' tab at the top of iX Developer.
I am not sure why you needed to power down the panel to get the communication error to clear. It should clear itself when communication has been restored to the device it is trying to communicate with.
Can you check to make sure that the RS422 output of the ABB RS232/RS422 adapter matches this pin out diagram.
Also, verify that the port on the panel is set to the proper protocol. That can be changed via the 'System' tab at the top of iX Developer.
I am not sure why you needed to power down the panel to get the communication error to clear. It should clear itself when communication has been restored to the device it is trying to communicate with.
Best Regards,
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Re: GPS application
Dear Mark, thank You for the help. The panel T7A has two connectors the same type: D Sub 9pin. Pin 5 is ground (I connected it to 0v of adapter), pins 2 and 3 for RS232, pin4: Rx+ for RS422 (connected to Tx+),pin9: Rx-(connected to Tx-). I did not use pins 1 and 6 (TX+,Tx-).
After unsuccessful try with RS422 I returned back to RS232 and in this time it did not work as well. Actually, one tag RMC.5 was OK, but other did not show anything. This morning, I tried again RS422, and got the same RMC.5 was OK other tags not.
Before I worked with 2 GPS receivers, a pocket one from Garmin and one used for a ship from SAAB. They sent the RMC sentences in different formats. For example, Garmin gave latitude with 4 decimals and SAAB with 5. May be, GPS simulator I use and T7A panel speak different languages?
Or may be wiring is wrong? Or output voltage from adapter too small?
After unsuccessful try with RS422 I returned back to RS232 and in this time it did not work as well. Actually, one tag RMC.5 was OK, but other did not show anything. This morning, I tried again RS422, and got the same RMC.5 was OK other tags not.
Before I worked with 2 GPS receivers, a pocket one from Garmin and one used for a ship from SAAB. They sent the RMC sentences in different formats. For example, Garmin gave latitude with 4 decimals and SAAB with 5. May be, GPS simulator I use and T7A panel speak different languages?
Or may be wiring is wrong? Or output voltage from adapter too small?
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: GPS application
Hi Waldemar,
Make sure that when you display something using an AnalogNumeric box that you have the display format set correctly (see pic). I have attached a ix developer project to this post. It works for me. Can you try it and see if it works for you as well? If not, can you zip and post your project so I can take a look at it? To make your project smaller if you post it, you can go into your project's folder and delete the 'Temp' folder.
Thanks,
Mark
Make sure that when you display something using an AnalogNumeric box that you have the display format set correctly (see pic). I have attached a ix developer project to this post. It works for me. Can you try it and see if it works for you as well? If not, can you zip and post your project so I can take a look at it? To make your project smaller if you post it, you can go into your project's folder and delete the 'Temp' folder.
Thanks,
Mark
- Attachments
-
- GPS_example_T7A.zip
- project to try
- (28.38 KiB) Downloaded 911 times
Best Regards,
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Re: GPS application
Thank You very much Mark.
Yesterday, I deleted the tag which was OK, to see what happens with others. But, they still were dead. After that I put it back as it was, downloaded the project again and left it for some hours. Next connection of the GPS imitator did show, that all GPS tags did work correct.
Today I repeated the trial and again everything was OK.
May be, something wrong with the panel memory? How many times is allowed to rewrite the program? For the last 4 months it happened, a couple hundreds times.
Is it possible to see on the screen, what communication settings are really chosen (may be script)?
Yesterday, I deleted the tag which was OK, to see what happens with others. But, they still were dead. After that I put it back as it was, downloaded the project again and left it for some hours. Next connection of the GPS imitator did show, that all GPS tags did work correct.
Today I repeated the trial and again everything was OK.
May be, something wrong with the panel memory? How many times is allowed to rewrite the program? For the last 4 months it happened, a couple hundreds times.
Is it possible to see on the screen, what communication settings are really chosen (may be script)?
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: GPS application
There is no rewrite limit on the internal memory. There is no way to display the serial port settings. You could just write them in a text box. Most people do not set the serial port speed more than once. You can display the IP setting if you want. There is an action for than. I believe in the Other group.
It sounds like you have a bad connection between the panel and the GPS via the serial cable. You could try a different serial cable, or wiggle the connections.
Mark
It sounds like you have a bad connection between the panel and the GPS via the serial cable. You could try a different serial cable, or wiggle the connections.
Mark
Best Regards,
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer