09-03-2008 03:14 AM
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
09-03-2008 04:04 AM - edited 09-03-2008 04:05 AM
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.
09-03-2008 06:24 AM
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
09-03-2008 06:57 AM
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
09-03-2008 07:08 AM - edited 09-03-2008 07:08 AM
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
09-03-2008 09:39 AM - edited 09-03-2008 09:39 AM
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.
09-03-2008 10:10 AM - edited 09-03-2008 10:12 AM
Hello, this is how it looks like.....
Sorry, I just see that I mixed up Tx and Rx....
09-03-2008 02:26 PM
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".
09-03-2008 02:45 PM
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.
09-03-2008 04:27 PM - edited 09-03-2008 04:27 PM