LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Global Variables and X-net problems?

Hello,

I made a program that take some frames from a .dbc file and change some parameters in it. I save it into a global variable,but when i use this variable the values are not correct(actually they are from main database,unmodified). In A picture you can see the modify process and at the end i write in a global var and i also do a verify to see the modify values and they are good. But in the B i use the same global variable and the values are not correct. In C you can see the output of A and in D the output of B. Anyone have a idea why this happens and how can be fixed? 

Thank you

0 Kudos
Message 1 of 4
(447 Views)

Hey bveritoa!

 

I took a look at your screenshots, and I'm a little unsure of what's happening, so I've got some questions to help clear up what we're looking at here. Are you able to post your code? Generally pictures are tough to debug, having actual code to look at can help a lot.

 

Is picture C or picture D the anticipated output? It sounded like C was the correct output, but D has values in the Type indicator where C does not. Are both CycleTime and Type incorrect, or just one?

 

Without having the code, I'd hazard a guess you were running into a race condition. Can you probe the global variable to make sure the correct values are getting pushed through in B? How are you enforcing that dataflow?

Claire M.
Technical Support
National Instruments
Certified LabVIEW Developer
0 Kudos
Message 2 of 4
(402 Views)

I was in a BT but tomorrow i will have access to my pc. I will try to send the VIs.

I will probably open a new discussion but i will ask you anyway maybe you know a way to find the answer. I try to send some data from a python(like a server over tcp/ip) and recieve it from labview. There is a problem labview tcp function can output only strings. I want to send different data from python(like int,or arrays of int) and receive i in labview as same data. Is this possible?

P.S. Thank you for answering in the first place

0 Kudos
Message 3 of 4
(382 Views)

Generally I would recommend starting a new thread if you have a new question--it'll get more traction in general than tacking onto an old thread. That said, I can still definitely provide some information here.

 

TCP/IP only sends bytes, and LabVIEW interprets that data as a byte string. You can use the Flatten to String and Unflatten from String to do this, but sending a value that isn't a string won't produce expected results on the other side.

Claire M.
Technical Support
National Instruments
Certified LabVIEW Developer
0 Kudos
Message 4 of 4
(367 Views)