02-28-2011 03:17 PM
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
03-02-2011 06:22 PM
program works fine, still do not know why the button doesn't work ? it doesn't work in
all my projectes... 😉
regards
03-07-2011 08:23 AM
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
03-07-2011 02:43 PM
Uprzejmie dziękuję za odpowiedź 🙂
przy okazji się za to wezmę
pozdrawiam
Paweł:)
03-07-2011 03:36 PM - edited 03-07-2011 03:37 PM
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.