Panel Pilot - SGD 14A - LASCAR ELECTRONICS

Antworten
Jack.I
Beiträge: 4
Registriert: Montag 12. November 2018, 12:19

Panel Pilot - SGD 14A - LASCAR ELECTRONICS

Beitrag von Jack.I » Montag 12. November 2018, 13:42

Hello everyone.

Firstly, I am sorry for this post being in English.
Google translate seems to be a lot better than before so please feel free to respond in whatever language you are most comfortable with.

I am trying to get a new device to communicate with ProfiLab over RS232.
The only way I seem to be able to get information overt the port is by using “Receive Byte”. This means that data comes in sections and I’m using a buffer to try and collect it into useful information.
I have tried several of the other RS232 function blocks but can’t seem to get data through them. I’m not sure if this is due to the way my other device is sending data or just an issue I am having with ProfiLab.

The other thing is I’m not displaying the data I should be.
Attached is an image of the data it sends when reading through a terminal and then what is being displayed in ProfiLab.

I’m not sure why the out voltage is so different. Is it to do with reading it in as a Byte?

Thank you all in advance and please do let me know if I have been unclear and I can explain differently.
Dateianhänge
Profi Display.png
Profi Display.png (6.43 KiB) 4620 mal betrachtet

IKT
Beiträge: 554
Registriert: Mittwoch 4. November 2009, 18:32

Re: Correcting RS232 Data

Beitrag von IKT » Montag 12. November 2018, 16:33

Hi Jack.I,
Jack.I hat geschrieben:
Montag 12. November 2018, 13:42
Firstly, I am sorry for this post being in English.
English is fine with me ...
Jack.I hat geschrieben:
Montag 12. November 2018, 13:42
I am trying to get a new device to communicate with ProfiLab over RS232.
In order to figure out the problem, far more information on that device of yours, is needed. Can you plse. provide a Link or a PDF containing "technical data" and maybe more information, on the device used?
Otherwise, we are simply guessing around ...
(e.g. getting as float as byte(s), is highly unlikely to work properly)
++++++
Gruss/regards IKT

Jack.I
Beiträge: 4
Registriert: Montag 12. November 2018, 12:19

Re: Correcting RS232 Data

Beitrag von Jack.I » Montag 12. November 2018, 16:50

Hi IKT,

Thank you for getting back.

I thought that might be the case but I didn't want to fill my original post with too much information that my not be relevant, in case it made a simple question look a lot more complicated.
But the device I am trying to communicate with with is a Panel Pilot - SGD 14A.

I am sending data from ProfiLab too the device with no problems, I know that it needs to be sent as a string. However I couldn't get the receive string to work and the receive as Bytes was working fine for everything other than the numeric values.

Thanks again and I've attached a Data sheet for the Panel Pilot.
Dateianhänge
panelpilot-panel-instrument-sgd-43-a.pdf
(2.58 MiB) 178-mal heruntergeladen

IKT
Beiträge: 554
Registriert: Mittwoch 4. November 2009, 18:32

Re: Correcting RS232 Data

Beitrag von IKT » Montag 12. November 2018, 18:07

Hi Jack.I,

unfortunately (but somehow expected), the manufacturer doesn't supply any useful information, outside of what his own proprietary SW is concerned (the RS232 protocol being used).
If, as you state, you can successfully transmit, then you might have to use a Terminal-Program, to be able to see, the formatting of the answer (you might have to watch it in hexadecimal), if it isn't a string.
All I got from the manufacturer is, that the mode of the device, should probably be set to: Terminal.
PL is usually using a user defined Terminator [CR]+[LF], if receiving a string ...
++++++
Gruss/regards IKT

abacom
Site Admin
Beiträge: 3917
Registriert: Dienstag 23. September 2008, 10:54
Kontaktdaten:

Re: Correcting RS232 Data

Beitrag von abacom » Dienstag 13. November 2018, 09:22

Hopefully helpful, but not very detailed...
https://www.lascarelectronics.com/support/?tag=1287

Seems to me the user has to define the serial protocol on the device himself? (like baudrate, data fields, etc.)
For RS484 they say "Currently ascii based raw data and MODBUS", but is this true for RS-232 as well?
Please ask manufacturer for detailed description.
ABACOM support

Jack.I
Beiträge: 4
Registriert: Montag 12. November 2018, 12:19

Re: Panel Pilot - SGD 14A - LASCAR ELECTRONICS

Beitrag von Jack.I » Dienstag 13. November 2018, 11:30

Thank you both for your responses.

I have contacted them before and you are correct in saying that they provide little explanation about the products interactions outside of its own property.

You are also correct that I have set up the device myself, and have attached an Image of that.
There are two values then being sent, the first being prefixed with out1 and the second out2.

There is a slight update.
Program as it stands is trying to read the data from the device and then send it back to it.
I had the sending data working but having just disconnected it and realized that that had been interfering with my receive data.
Now when I send, it sends the data bit by bit to the buffer as shown in the attached image.

Ideally what i would like to do is split and sort that data into the V for out1 and the V for out2 and send it back to the same device.
But as I said whenever I try to use the send and the receive in the same program here my send data is fine but my receive gets very messed up.

I will attach a section of the project because I have a feeling that there is something very basic that I am being wrong here. Perhaps in how I am trying to process the data or just even how I am Using the CLK.

Thank you again for your help, I am quite new to this software so please excuse the basic mistakes.
Dateianhänge
SendReciveToPanelPilot.prj
(3.58 KiB) 159-mal heruntergeladen
as.JPG
as.JPG (49.58 KiB) 4581 mal betrachtet

Jack.I
Beiträge: 4
Registriert: Montag 12. November 2018, 12:19

Re: Panel Pilot - SGD 14A - LASCAR ELECTRONICS

Beitrag von Jack.I » Dienstag 13. November 2018, 12:48

My apologies,
The image of what I was reading in ProfiLab did not attach.
It is here.
Dateianhänge
bs.JPG
bs.JPG (44.27 KiB) 4575 mal betrachtet

IKT
Beiträge: 554
Registriert: Mittwoch 4. November 2009, 18:32

Re: Panel Pilot - SGD 14A - LASCAR ELECTRONICS

Beitrag von IKT » Dienstag 13. November 2018, 17:33

Program as it stands is trying to read the data from the device and then send it back to it.
Sorry, but all that is in the .prj is: a Receiver (Byte) and no Sender ... (you'll need both!)
Before going into a PL-Program, you'll have to figure out the SW part of the protocol (the physical protocol, I'm usually referring to as: HW-Setup, to avoid ambiguity), the commands, that have to be sent to the device (once the HW-Setup is correctly done).
++++++
Gruss/regards IKT

abacom
Site Admin
Beiträge: 3917
Registriert: Dienstag 23. September 2008, 10:54
Kontaktdaten:

Re: Panel Pilot - SGD 14A - LASCAR ELECTRONICS

Beitrag von abacom » Mittwoch 14. November 2018, 09:37

So you receive a readable string with some field separators in it. That´s fine!
Please refer to the ProfiLab RS232 "GPS-Demo" example, which has similar requirements.
It shows you how to receive a string (with all fields in one go), how to separate data fields with $Part component and how to filter certain channels. Looks like ">" is the line (sync) separator and "," is the field separator, right? (There may likely be a chr(13) chr(10) for line end sync as well?)
Good luck!
ABACOM support

Antworten

Zurück zu „Thema RS232“