problem in reading binary data into navision

viswanathviswanath Member Posts: 24
edited 2007-03-03 in Navision Attain
Hi all
This is viswanath working as a technical consultant.
i have a problem in connecting an embedded system tool (c/I pos)
the I pos working with front-end VB and using MSACCESS database.
The client wants to change it to navision.
The machine has a proto type in hexadecimals which has been converted into navision
i am able to convert and the ASCII code into hex and send it to the machine.
After receiving the code the machine replies with a return value in hexa decimal code which is not been supported by navision
navision is giving the following messatge
"the data type is not supported bi navision
navision supports only vt_void,vt_12,vt_14,vt_bool........."
If anyone want to go through the code here i am giving the code

//for output
CREATE(as); //as is a automation ( a dll which is built in vb for converting ascii to hexa and vice versa )

str:='01,FF,10,FO,03,41,43,7C'; //prototype,str is a code variable
z:=as.ToAsc(str);//z is a text variable
"mscommcontrol 6.0".CommPort(1);//ms commcontrol is comm control of ms communication control
"mscommcontrol 6.0".Settings('38400,N,8,1');
"mscommcontrol 6.0".InputLen:=0;
"mscommcontrol 6.0".PortOpen(TRUE);
"mscommcontrol 6.0".Output(z);//output code

With this code i am able to communicate the mishion .
when i am trying to get return value it is giving the problem
//code for input
mscommcontrol 6.0".InputMode(1);(if it is '1'it takes in binary format
it is '0' it takes in text format
"mscommcontrol 6.0".InputLen:=0;
"mscommcontrol 6.0".InBufferSize:=1024;
"mscommcontrol 6.0".InBufferCount:=256;


stx:="mscommcontrol 6.0".Input();
x:=as.ToHex(stx);
MESSAGE('%1',x); //the message box displays the input


can anyone help me in this senario .
if there is any another way to communicate the embedded systm please let me know

thx and regards
viswanath

Comments

Sign In or Register to comment.