CY3274 PLC development kit issue

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
user_3907121
Level 1
Level 1

we are working on CY3274 PLC development kit.  polling method is used to transmit and receive. packet is transmitted successfully from one controller to another . But when both transmit and receive is enabled  (i.e sending a message and receiving feedback from the other controller ) ,there is a delay in the transmission and communication is breaking after sometime. why is it so?

0 Likes
1 Solution

Hello Divya,

I am quoting from the datasheet of the PLT Uer Module.

  • CSMA: When band-in-use detection is enabled, the protocol gives the random selection of a period between 85 and 115 ms (out of 7 possible values in this range) in which the band in use detector must indicate that the line is not in use, before attempting a transmission. After completing a transmission when band-in-use is enabled for the system, the application should wait 125ms before the next transmission.
  • Band-In-Use (BIU): A Band-In-Use detector, as defined under CENELEC EN 50065-1, is active whenever a signal that exceeds 86 dBuVrms anywhere in the range 131.5 kHz to 133.5 kHz is present for at least 4 ms. This threshold can be configured for different end-system applications not requiring CENELEC compliance.The modem tries to retransmit after every 85 to 115 ms when the Band is in use. The Transmitter times out after 1.1 seconds to 3.5 seconds (depending on the noise on the Powerline) and generates an interrupt to indicate that the transmitter was unable to acquire the Powerline.
  • For non-CENELEC compliant systems, the BIU interval can be modified. The BIU Time Interval (min) parameter sets the minimum possible interval period. The BIU Time Interval (span) parameter sets the span from the lowest possible interval to the highest possible interval. For example a BIU Time Interval (min) of 10ms and BIU Time Interval (span) of 15ms will generate a random selection of a period between 10 and 25ms (out of 7 possible values in this range). Note that the BIU Time Interval (span) of 5ms does not generate a random period out of 7 possible values. Also the BIU Timeout can be changed so that the transmitter times out on the first band-in-use detection. Refer to the Timing_Config register for how to set these properties.

Delays will increase proportionately with the number of node trying to transmit simultaneously or nearly simultaneously. This is the expected behavior.

Best regards,

Sampath

View solution in original post

0 Likes
5 Replies
SampathS_11
Moderator
Moderator
Moderator
250 sign-ins 250 solutions authored 5 questions asked

Hello Divya,

The code example for CY3274 is designed for either transmit or receive operation. How do you modify the code for simultaneous transmit and receive? The PLC can transmit only if the Bus is idle, and when not receiveing a packet.

Best regards,

Sampath

Dear Sampath,

Each functionality is scheduled a particular time in the code. There is a time difference of 100 mSec between transmission of 2 kits . Hence both the kits are not transmitting at the same time. Is that time of 100mSec  enough for the power line to clear?

Regards ,

Divya K

0 Likes

Hello Divya,

Can you kindly follow this code in your project?

PLT_SendMsg(); // Prepare the message to be transmitted

     do
     {
       PLT_Poll(); // Run the network protocol to send the message
       if (PLT_Memory_Array[INT_Status] & Status_Value_Change) // Check if the status was updated
       {
         if (PLT_Memory_Array[INT_Status] & Status_UnableToTX)
         {
                                                               // Add code here to process why the transmitter is currently busy
         }
         if (PLT_Memory_Array[INT_Status] & Status_TX_NO_ACK)
         {
                                                              // Add code here to process why there was no ACK received
         }
         if (PLT_Memory_Array[INT_Status] & Status_TX_NO_RESP)
         {
                                                         // Add code here to process why there was no response received
         }
         if (PLT_Memory_Array[INT_Status] & Status_TX_Data_Sent)
         {
                                                        // Add code here to process what to do after a packet was sent successfully
         }
         PLT_Memory_Array[INT_Enable] &= ~INT_Clear; // Clear the INT_Status register
         break;
       }

Do let me know the return status.
Best regards,
Sampath

hello Sampath,

I am using this code to send the message over power line. This function is called for every 100msec . i am able to send the message. But there is a delay when i send packets from other end also. when i connect external hardware circuits to the kit , the delay in transmission increases for more than 5 seconds. Why is it so?

PUBLIC void fn_PLT_transmit(void)

    PLT_Start(); // Start the Powerline Transceiver

    PLT_Memory_Array[Local_LA_LSB] = 0x01; // Set local node parameters

    PLT_Memory_Array[PLC_Mode] |= (TX_Enable | RX_Enable );

  

    PLT_Memory_Array[TX_DA] = 0x02;

   

// Set destination node parameters

    PLT_Memory_Array[TX_Config] |= TX_Service_Type;

   

PLT_Memory_Array[TX_CommandID] |= CMD_SENDMSG;

   

//set the message length.

PLT_Memory_Array[TX_Message_Length] = 0x03;

  //Function stores the data to be sent in tx buffer.

    fnPrepare();

PLT_SendMsg(); // Prepare the message to be transmitted

     

    PLT_Poll(); // Run the network protocol to send the message

// Check if the status was updated

   if (PLT_Memory_Array[INT_Status] & Status_Value_Change)

  {

//printing the data sent  here

    }  // Send a new packet

}

0 Likes

Hello Divya,

I am quoting from the datasheet of the PLT Uer Module.

  • CSMA: When band-in-use detection is enabled, the protocol gives the random selection of a period between 85 and 115 ms (out of 7 possible values in this range) in which the band in use detector must indicate that the line is not in use, before attempting a transmission. After completing a transmission when band-in-use is enabled for the system, the application should wait 125ms before the next transmission.
  • Band-In-Use (BIU): A Band-In-Use detector, as defined under CENELEC EN 50065-1, is active whenever a signal that exceeds 86 dBuVrms anywhere in the range 131.5 kHz to 133.5 kHz is present for at least 4 ms. This threshold can be configured for different end-system applications not requiring CENELEC compliance.The modem tries to retransmit after every 85 to 115 ms when the Band is in use. The Transmitter times out after 1.1 seconds to 3.5 seconds (depending on the noise on the Powerline) and generates an interrupt to indicate that the transmitter was unable to acquire the Powerline.
  • For non-CENELEC compliant systems, the BIU interval can be modified. The BIU Time Interval (min) parameter sets the minimum possible interval period. The BIU Time Interval (span) parameter sets the span from the lowest possible interval to the highest possible interval. For example a BIU Time Interval (min) of 10ms and BIU Time Interval (span) of 15ms will generate a random selection of a period between 10 and 25ms (out of 7 possible values in this range). Note that the BIU Time Interval (span) of 5ms does not generate a random period out of 7 possible values. Also the BIU Timeout can be changed so that the transmitter times out on the first band-in-use detection. Refer to the Timing_Config register for how to set these properties.

Delays will increase proportionately with the number of node trying to transmit simultaneously or nearly simultaneously. This is the expected behavior.

Best regards,

Sampath

0 Likes