Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

parse data

hi i'm comunnicating with a UDC (Universal digital controller from honeywell) 3000 using VB 6 and the CWSERIAL, but i have a couple of problems the first is that when i send him some data for example when i ask for the temperatura he send me back the next response:

0080C1,120,150 the first 6 digit tell about the communication if it was right or wrong the next 3 digits is the thing that i want to read for example the temperature or the Set point , and the last 3 digits is the value of the thing that im reading in this case the Temperature, what i need yo do is take this and the last value wil be put in a isevensegment the firts 6 digit i have to compare to look for some mistakes, so how can i parse this in 3 parts? i look some example in this page but it gives me type dismatch error i try something like this

response= cwserial1.tasks("Dato").parse(data)

text1.text= response(0)
text2.text=response (1)
text3.text=response (2)


2)And the other question is that i want to know how can i send a data to cwserial and put the option that someone could fill a part of the data , let me explain it better with this example:

when i want to change the Set point of the temperatura i need to send this :

03,0204,65,18,153,200.0,\13\10 and i do that and that's fine the problem is that this program will be used for other people and i want that they only put the value of the temperature and that's all ( the value of the new temperature is the one in red the 200.0). How can i put some text box or something like that, that when someone put some value like 100.0 and the program then send the array of bytes that i put and put the 100.0 where is the 200.0 ?

Appreciating all the help you could give me Tomás Estrada

0 Kudos
Message 1 of 4
(7,354 Views)

Tomás,

Please do not start new topics about the same issue as you did on the following urls:

http://forums.ni.com/ni/board/message?board.id=231&message.id=5666#M5666

http://forums.ni.com/ni/board/message?board.id=170&message.id=317427#M317427

 

Now about your problem, are you using an instrument driver for your UDC 3000? Where did you get it from? Are you using serial port to communicate with UDC 3000? Wich NI application are you using?

 

Dario Camargo

NI Brazil

#1152685
0 Kudos
Message 2 of 4
(7,335 Views)
hi , sorry for that, i already solved the problem of communicating with the udc 3000 and the first problem that i put in this post about parse the data with vb 6, the only problem that i can't  fix is how send a data like i say before i need to send this data

02,0204,65,18,125,100.0,\13\10

the part in red the 100.0 is the value that i need to put to change the Set point of the controllers, and i want  to know how can i send this data but adding the value of the new set point from a text box for example that i can put the value in some text box like 200 and that value save it and put in the data 02,0204,65,18,125,value,\13\10 and the send the data to the controller.

Tomás Estrada
0 Kudos
Message 3 of 4
(7,304 Views)
Tomás,
 
You'll have to set that data as a variable and then change with with a controller.
 
That's not an issue related to the Measurement Studio, that's a programming issue.
 
 
Dario Camargo
NI Brazil
#1152685
0 Kudos
Message 4 of 4
(7,274 Views)