What is makegetstatuscmd() command function?
-
Hi there, I found difficulties to understand the following function,
void MakeGetStatusCMD(void)
Under this function, float type WORDS and size are defined . This function is using for UART/MODEBUS communication protocol. Its using to know the status of receiving data in main dsp control board. Variables are defined for size of DSP Registers and counter of register. At last, its written
SendDSPCMD()
-
Hi there, I found difficulties to understand the following function,
void MakeGetStatusCMD(void)
Under this function, float type WORDS and size are defined . This function is using for UART/MODEBUS communication protocol. Its using to know the status of receiving data in main dsp control board. Variables are defined for size of DSP Registers and counter of register. At last, its written
SendDSPCMD()
-
I guess you'll need to deliver more details about this
MakeGetStatusCMD()
function (his body, anything), because we don't know anything about this
I guess you'll need to deliver more details about this MakeGetStatusCMD() function (his body, anything), because we don't know anything about this Its a command type function. Lets say DSP is master and another type of MCU is slave. We are trying to make bridge among them. Additionally, this Modebus protocol has interface with API and display.It may have remote control piping. Slave is host here. This file where I got this function has included register and device functioning header file. Those can be describe here,
BOOL SysUsartBusy;//combining the functions of a data bus to carry information, an address bus to determine where it should be sent or read from, and a control bus to determine its operation.
WORD SysCmdTimeoutCount;//Byte and Word Swapping in Modbus, proposes a method to timeout a long-running command .
WORD SysCmdAckDelayCount;// system acknowledged, puting a delay count
WORD SysCmdDelayCount; // delay will counted
//The tail() method is utilized to return a new queue that consists of all the elements except the first one.
BYTE CmdQueueHeader, CmdQueueTail;// In modbus data stream at first (flag, adress, control) belongs from a header file,Returns the queue of upcoming commands for the specified device.
BYTE CmdQueue[CMD_QUEUE_SIZE];//Queue is a function, may be its use for checking 1st and last data within a particular size. -
I guess you'll need to deliver more details about this MakeGetStatusCMD() function (his body, anything), because we don't know anything about this Its a command type function. Lets say DSP is master and another type of MCU is slave. We are trying to make bridge among them. Additionally, this Modebus protocol has interface with API and display.It may have remote control piping. Slave is host here. This file where I got this function has included register and device functioning header file. Those can be describe here,
BOOL SysUsartBusy;//combining the functions of a data bus to carry information, an address bus to determine where it should be sent or read from, and a control bus to determine its operation.
WORD SysCmdTimeoutCount;//Byte and Word Swapping in Modbus, proposes a method to timeout a long-running command .
WORD SysCmdAckDelayCount;// system acknowledged, puting a delay count
WORD SysCmdDelayCount; // delay will counted
//The tail() method is utilized to return a new queue that consists of all the elements except the first one.
BYTE CmdQueueHeader, CmdQueueTail;// In modbus data stream at first (flag, adress, control) belongs from a header file,Returns the queue of upcoming commands for the specified device.
BYTE CmdQueue[CMD_QUEUE_SIZE];//Queue is a function, may be its use for checking 1st and last data within a particular size.Do you have the source code for the MakeGetStatusCMD() function?
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment "Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst "I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
-
Do you have the source code for the MakeGetStatusCMD() function?
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment "Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst "I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
Dear Sir Jeron, Really I did not figure out what you want to explain. Do you mean its Query command ? For API purpose those command work to identify device? Does it work like windo command ?
Quote:
CMD commands are an antiquated and mostly unnecessary tool from an era of text-based input
Kindly talk about facts that the messages are issued using Message Queue interface call. Command queue header files need to explain.
-
Dear Sir Jeron, Really I did not figure out what you want to explain. Do you mean its Query command ? For API purpose those command work to identify device? Does it work like windo command ?
Quote:
CMD commands are an antiquated and mostly unnecessary tool from an era of text-based input
Kindly talk about facts that the messages are issued using Message Queue interface call. Command queue header files need to explain.
Quote:
Under this function, float type WORDS and size are defined .
Do you mean "inside' this function? If so, do you know what is inside this function? Is this a library function for a certain MCU? If so, is there any documentation of this function? Your initial question is quite unclear, at least to me.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment "Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst "I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
-
Quote:
Under this function, float type WORDS and size are defined .
Do you mean "inside' this function? If so, do you know what is inside this function? Is this a library function for a certain MCU? If so, is there any documentation of this function? Your initial question is quite unclear, at least to me.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment "Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst "I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
Thank you. Did you see my second reply? I think this information is enough to understand what would be the function. This project is tied on QT5 with STM32 and TI DSP F2806x. widget.h Example File | Qt OpenGL[^] This project contains IAR,ECILPSE IDE. A display is added in ST slave, it has APP files. TCP server is involved here. Server is updating the information about DSP register. Its sending modebus Queue initiating this funtion,
Quote:
void CModebusTCP::OnReceived(BYTE *pData, int nSize)
Under the function the variables are,
Quote:
void MakeGetStatusCMD(void) { WORD *pWord; float *pFloat; WORD Size; pWord = (WORD*)Uart1.TxData; pWord[0] = DSP_CMD_GETTATUS; pWord[1] = g_AdjustOutput; pWord[2] = g_RunMode; pWord[3] = g_Run;