LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

serial communication, but not RS232 protocol

Hi,

 

I have two units. Unit1 sends a value via serial communication to unit2. But it is not RS232 protocol.

Unit1 just sends a "ready-signal" via a separated cable to unit2, and then unit2 sents a value (16bit) to unit1. Both are synchronised via a clock-signal that is also sent from unit1 to unit2.

Now I have the following problem. I just want to read the 16bit value, that is sent from unit1 to unit2. But all modules for serial communication that I can find in LabVIEW are using the RS232 protocol. But as already explained (hopefully you understand what I mea), there is no start or stop bit, and no parity and so on..... There are only the 16bit.

How can I read this 16 bit?

Thank you for your help.

 

Regards

Wernie

0 Kudos
Message 1 of 13
(4,656 Views)

Wernie76,

 

You can use VISA to monitor the levels of the pins individually.  You will find "Mopdem line Settings" under the myriad of properties for a serial VISA refnum(vie property node).

 

 

 

You will have to set up the synchronisation and data receipt / transfer in software.

 

The speed of the port MAY be enough for your needs.

 

Shane.

Message Edited by Intaris on 09-03-2008 04:05 AM
0 Kudos
Message 2 of 13
(4,653 Views)

Hello Shane,

 

thank you for your answer. But I am very sorry, to be honest I do not really understand what you mean 😞

 

A view weeks ago I visited the LabVIEW Basic1 Course and now it is the first time that I try to work with LabVIEW.

I know that there is something called "propertie node", but unfortunately I do not know exactly how to use it and word with it. Maybe you can explain your answer more detailed?!

I would be very grateful!

 

Thanks for your help.

 

Regards

Wernie

0 Kudos
Message 3 of 13
(4,632 Views)

Hi Wernie,

insert a property node into your blockdiagram and connect the Com port reference to the refernce input. Select the properties which you see in the attached picture above. Now you can check the state of your lines.

 

Hope it helps.

Mike

0 Kudos
Message 4 of 13
(4,620 Views)

On the block diagram (where you wire your code), right click to get the Functions Palette.

Inside the Application Controls you will find the Property Node.  Or you can type "Property Node" when selecting search at the top of the palette.

 

Place the property node on your block diagram.

 

Right-click on it and choose: Select Class > VISA > I/O Session > Serial Instr    (see image below)

 

Then right-click again on it and follow the selection in the image previously posted.

 

R

Message Edited by JoeLabView on 09-03-2008 08:08 AM
0 Kudos
Message 5 of 13
(4,613 Views)

I have two units. Unit1 sends a value via serial communication to unit2. But it is not RS232 protocol.

Unit1 just sends a "ready-signal" via a separated cable to unit2, and then unit2 sents a value (16bit) to unit1. Both are synchronised via a clock-signal that is also sent from unit1 to unit2.


Is the serial port actually used? If so, you need to specify which lines are actually used. Are the Receive/Transmit lines used, or are other lines used? On what line is the clock? The kind of communication you describe is more akin to a SPI protocol without the slave select line. 

Message Edited by smercurio_fc on 09-03-2008 09:39 AM
0 Kudos
Message 6 of 13
(4,589 Views)

Hello, this is how it looks like.....

 

Sorry, I just see that I mixed up Tx and Rx....

Message Edited by Wernie76 on 09-03-2008 10:12 AM
0 Kudos
Message 7 of 13
(4,581 Views)

Are you trying to basically "piggy-back" onto that cable so you can read the pulse train into LabVIEW? Sort of like a sniffer? If so, keep in mind that raises electrical consideration. Anything you connect to those wires will affect the circuit. This means you need to connect something that has a high input impedance. Otherwise you're likely to create a voltage divider situation and corrupt the communication. I haven't checked the input impedances of serial ports lately, but this is something you need to consider.

 

That said, what is the frequency of that signal? If you have no clock controlling the read (which you won't) then you have to basically perform continuous polling in LabVIEW to get the value of the signal so you can see whether it's high or low. Polling means software timing, and software timing means you can't guarantee the speed at which the program will read the "bits". 

0 Kudos
Message 8 of 13
(4,548 Views)

Well seeing as the host computer (where LV will be running) appears to be generating the clock, it might work with a relatively slow clock rate.

 

So you basically have a high-low cycle on the pin you need to set (After setting the other line to high) and then for each cycle, read in the state of the incoming line.......

 

Or have I misunderstood something.  I understood that for every low to high edge send from the computer, you receive a bit of the number, no?

 

Shane.

0 Kudos
Message 9 of 13
(4,538 Views)
My understanding based on the original post and the picture is that neither M1 nor M2 is the PC. They are 2 "units" communicating with each other, and the user is trying to see ("sniff" ) the communication on the PC. Hence the two wires connecting onto the TX and RX lines and saying "to COM port of my computer".
Message Edited by smercurio_fc on 09-03-2008 04:27 PM
0 Kudos
Message 10 of 13
(4,517 Views)