LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Receiving and Sending data between PC and compactRIO with TCP/IP

Hi,

i have to receive 15 bytes of data (form a sensor- doesn't matter what sensor it is) on compactRIO-9022 serial port. Then i have to

send them to the PC over TCP/IP. From the PC i need to receive 13 bytes of data (data to control a device) and send them through the same serial port of cRIO. On the other hand on the PC i want to send those 13 bytes of a control data to cRIO and receive the 15 bytes form the sensor, put them in one of PC serial port and to display them if the user wants to do it.

 

The data in the receive part will be BUFFERED, waiting for those 15 or 13 bytes.

I attach only file for PC , cause the one for compactRIO will be similiar.

 

I know that the part that sends the data is ok, i'm worried about the part that receives data ? Will it work ? I will be able to test the day after tommorow.

 

Also the issiue is the fact that my STOP button does not work:)

thanks for any help

regards

pauldab

 

0 Kudos
Message 1 of 5
(3,318 Views)

program works fine, still do not know why the button doesn't work ? it doesn't work in

all my projectes... 😉

 

regards

0 Kudos
Message 2 of 5
(3,281 Views)

Hi pauldab

 

Try following troubleshooting:

- use highlight execution, when You'll press stop button to see where Your program gets stuck - this will probably determinate reason and will lead You to the solution.

- use shared variable instead of local variable

 

Hope it will help.

 

Best regards

 

Barbara Zalewska

0 Kudos
Message 3 of 5
(3,253 Views)

Uprzejmie dziękuję za odpowiedź 🙂

przy okazji się za to wezmę

pozdrawiam

Paweł:)

0 Kudos
Message 4 of 5
(3,239 Views)

Your stop button is set for Switch Until Released.  That is like a momentary button.  As soon as you let go it goes back to False, and your other local variable instances may not have had time to read it as a True yet.

 

Try setting it for Switch When Released.  Now when you let go, it goes to True, and remains that way until you either press it again or programmatically set it back to false.

 

You may want to try using Unbundle by Name rather than Unbundle on your clusters.  That way you only have to access the one or two elements of interest thus saving diagram space.

0 Kudos
Message 5 of 5
(3,233 Views)