LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sensor synchronisation

Dear guys,

I just want to know that its has a ways to make a time stamp betwen the microcontroller and the labview?

Let me make a brief explain about my work.
I'm required to send a signal to the server (Using PIC 16F877A or microcontroller) and ask the PIC to start by sending a packet of data via wifi.
The data should cointain an array of data including the time reference.
Anyone have an idea how I can triger the PIC clock?

Regards,
MF Hussin
0 Kudos
Message 1 of 7
(3,562 Views)
Hi All,
 
Some addition.
What type of signal should I send to make sure that microcontroller recognise the instruction?
0 Kudos
Message 2 of 7
(3,549 Views)

Hi MF Hussin,

Can you tell me a little more about your setup?  Are you using a serial port (ie. RS-232 serial) on your computer thats running LabVIEW to talk to the PIC 16F877A?

Way S.

NI UK Applications Engineer

0 Kudos
Message 3 of 7
(3,532 Views)
Hi,

Our project setup at the transmision side, we using PIC 16F877A. This PIC is programming using MPLAB IDE v5.6. At this side RS 232 is using to connect it with AirborneDirect Wireless Device Server. This server will transmit the data via the wifi application.

At the receiver side, we using Netgear access point router. This access point will receive a data in TCP protocol. The LabView version 8.0 is used to analyse the data and dispaly the waveform. The data that we measured is voltage.

The problem now, how I'm going to trigger the PIC to send me the packet data with the timestamp?

Hope this information is clear.

Many thanks.

Regards,
MF Hussin
0 Kudos
Message 4 of 7
(3,519 Views)
On your receiver side with LV, you can use the TCP VIs from the Data Communication >> Protocols >> TCP function palette to send and receive TCP packets through ethernet/wiFi. There are examples on how to send/receive TCP packets if you search for 'TCP' in the Example Finder.  You can use these VIs to send a command as a trigger to your transmission side. You would have to program the microcontroller on the transmission side (using the MPLAB IDE) to be able to receive and decode the command and send the packet data and timestamp back. 
 
Let me know if that helps.
 
Regards
Way S.
 
Message 5 of 7
(3,500 Views)
Hi,
 
I have manage to implement the TCP in my program.
But the problem now just to do the send program.
It is possible to put the open tcp and listen tcp in one block diargram?
Can I apply the same port for both?
 
Thanks.
 
0 Kudos
Message 6 of 7
(3,488 Views)
The way TCP works is that you have one device initiate/open the connection, and one device listen for the connection. Both open and listen ports should be the same for the connection to be established. Once the connection is established, BOTH the initiating and listening devices can send and receive to one another. That means the established connection is bi-directional.
 
So yes, you can put both TCP Open and Listen VIs in the same block diagram, but then you would be establishing a connection with yourself. I think you would want to set one device up as an initiator and another as the listener. For example, you could setup your LV machine up as the initiator and the microcontroller as the listener.
 
I hope that helps. Let me know if you have any other questions.
 
Way S.
Message 7 of 7
(3,468 Views)