Jump to content

Annatooli

Members
  • Posts

    31
  • Joined

  • Last visited

Posts posted by Annatooli

  1. So , like this ??

    // User code starts below this comment
    
    // User code ends above this comment
    
    static void Boolean(unsigned char A, volatile unsigned char* C)
    {
    	// User code starts below this comment
    		if(!A){
    			*C = 0; // false
    		}else{
    			*C = 1; // true
    		}
    	// User code ends above this comment
    }
    
    // User code starts below this comment

    It does compile, just there is "char" in type name. So I assumed it has to be some sort character.

  2. Thanks for reply.

    I will keep both functions for now, but If I need more of those functions I will make unified array lengths, and add parameter with length.

    I did look into C code but I cant figure out what to do with "bit" variable type. It is "unsigned char" in C, but not in examples nor in  documentation is mentioned  what I should put into those variables for returning  true and false.

     

     

  3. I have two identical functions, except "Function In" has different array lengths.

    Inside function I can easily determine  array length with "Array Size", but understandably "Function In"  doesn't  accept different array lengths.

    Is it possible declare "Function In" so it will accept different length of arrays ??

    I figured if I declare short arrays they will accepts calls with longer arrays. Question, Is entire array accessible from  function or only smaller subset ?

  4. When I checked my project I notice error on my RS485 CPU COM port it says "Both Slaves have been set to the same communication protocol. Slave1 may be set to TCP/IP, while Slave2 is set to RS485."

    Does it mean UniLogic RS485 can access only one slave device ?? So if I have more than one modbus slave I have to connect second slave through TCP/IP connection ?? What happens when I have 21 devices ?? I am really screwed if there are this kind of limitation.

×
×
  • Create New...