LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Interfacing Zigbee with Labview VIA RS232

One of the problems with the Tx (Serial) port on the microcontroller is that it is appending a 1 to the front and the end of the byte as the start and stop bit, so that only leaves us with 6 bits to really play around with because the byte that's being sent out looks like" 1 _ _ _ _ _ _ 1 ". As of right now I've got our coder trying to send something that could be set up as a parser, we'll see how that goes. We're going to try a test like you said by sending "A12345678B12345678C12345678" and see if we can get LabView to put them into an array.

 

As of right now we're trying to get our coder to send us just something simple like an "A" and that only, however, by the time it gets through the VISA read and makes it to anything that we can read (We used "Highlight Execution") and we're getting "õýýýõýõýõõýõ" through the serial line. When we use XCTU to try and read what he's sending it's actually coming out as something different (We're getting a Hex value of FF and F7 and FD).. So lost again. We're definitely going to use your idea of splitting up the bytes with A B and C. We're thinking about using a modified version of the GetXY.vi from here: http://forums.ni.com/t5/LabVIEW/How-to-break-a-string/m-p/543760

0 Kudos
Message 31 of 39
(2,088 Views)

If you have a start and stop bit (like any serial communication byte would have) but only 6 real data bits in between,  then try configuring your serial port on the PC for 6 data bits.

0 Kudos
Message 32 of 39
(2,084 Views)

Hey...

 

I as a student is working on a project where i want to wirelessly move my spartan-3e fpga starter 2.0 NI kit using zigbee..My idea is that on transmitter side i have my laptop with one xbee module attached, through which i vl send my commands to other xbee using X-CTU terminal .

 

On other side ,other xbee module is attached to FPGA mounted on starter kit via RS-232 cable..

I have connected the starter kit with my pc using LAN cable and able to detect it properly.Just m naot getting idea what i should do so that the commands send by xbee on transmitter side should be sucessfully read by xbee attached to FPGA (starter) kit.

 

I am very new to your kit and dont know how to proceed.

 

Please help me to start..

 

please..

please..I need to complete my prj fast in approaching deadline.:(

 

0 Kudos
Message 33 of 39
(1,744 Views)

Hey sharry,

 

A little more information would be helpful, what version of LabVIEW are you using and FPGA hardware are you using? 

BeauH
Applications Engineer
National Instruments
0 Kudos
Message 34 of 39
(1,727 Views)

Hi sir,

 

 

Thanks for your response...

 

Yeah I am using LABVIEW 2011 SP1 and the FPGA hardware is sbRIO-9632  which is in NI starter kit 2.0...If any other information u need, pls let me know and help me out...

 

 

Thanks,

 

 

0 Kudos
Message 35 of 39
(1,724 Views)

Hey sharry,

Ok so what port are you using to set up the communication are you using  the onboard port or a module? Are you able to run the shipping example that came with the RIO? Have you been successful in communicating over the serial port with something other than Zigbee?

 

If you are trying to communicate wirelessly have you looked at this https://decibel.ni.com/content/docs/DOC-20651 or https://decibel.ni.com/content/docs/DOC-18154 

 

hope this helps.

BeauH
Applications Engineer
National Instruments
0 Kudos
Message 36 of 39
(1,715 Views)

Hello sir,

 

Sry for late reply..

 

Ya m communicating with on board serial port on sbRIO i.e pin no.12 via RS-232 cable attached on other side with my xbee receiver module.

 

Yes firstly, I am trying to communicate with basic serial read and write example using VISA property..Attached is  my .vi file. Please have a look at it.

 

In this in VISA resource name , I am selecting ASRL1:INSTR which comes automatically when i plug RS-232 on SbRIO and connect starter kit with my laptop via Ethernet cable. When I am writing any data  on "string to write" box in front panel , I am successfully able to get back that string on "read string" box in front panel.

 

That indicates serial communication is proper..Next when i tried to do it wirelessly i.e not writing data on front panel but instead sending packet from my transmiiting xbee to receiving xbee..I am not getting output on "read string " box in front panel.

 

Can u pls suggest whether I am goin in proper direction or not..Or something else is needed.

 

 

Download All
0 Kudos
Message 37 of 39
(1,705 Views)

Hey sharry,

 

Since you can communicate fine when you are wired directly to the sbRIO and the issue is just with the Zigbee one thing you could do try running NI I/O Trace while you run your program to see where the communication is breaking down. Also review the programming manual for the Zigbee to check how it handles its handshaking and what the timeout for the device is and if it is needs the serial communication to have a specific configuration i.e. baud rate. 

BeauH
Applications Engineer
National Instruments
0 Kudos
Message 38 of 39
(1,693 Views)

Hello sir

 

 

Actually I dont know What to do now??? Which zigbee manual should i refer? As such I have configured evry parameters like baud rate(9600), no. of bits, parity and so in my xbee and labview programming. They both have similar parameters..

 

pls give me some more detail regarding implementation

 

 

 

Thanks

0 Kudos
Message 39 of 39
(1,688 Views)